linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: fsck on ext4: "WARN Wrong bounce buffer write length: 1024 != 0"
       [not found] <22367f07-3448-f771-0363-b5c6f500b77d@aixigo.com>
@ 2019-08-27 16:35 ` Theodore Y. Ts'o
  2019-08-28  7:57   ` Mathias Nyman
  0 siblings, 1 reply; 3+ messages in thread
From: Theodore Y. Ts'o @ 2019-08-27 16:35 UTC (permalink / raw)
  To: Harald Dunkel; +Cc: mathias.nyman, linux-usb

On Tue, Aug 27, 2019 at 08:00:14AM +0200, Harald Dunkel wrote:
> FYI: "fsck -y" on an external USB drive (USB-C, ext4) gave
> me a ton of messages
> 
> :
> [  191.261939] xhci_hcd 0000:05:00.0: WARN Wrong bounce buffer write length: 1024 != 0
> [  191.263743] xhci_hcd 0000:05:00.0: WARN Wrong bounce buffer write length: 1024 != 0
> [  191.263788] xhci_hcd 0000:05:00.0: WARN Wrong bounce buffer write length: 1024 != 0
> [  191.263840] xhci_hcd 0000:05:00.0: WARN Wrong bounce buffer write length: 1024 != 0
> [  191.266857] xhci_hcd 0000:05:00.0: WARN Wrong bounce buffer write length: 1024 != 0
> :
> 
> Related to 597c56e372dab2c7f79b8d700aad3a5deebf9d1b, AFAICT.
> 
> Kernel is 4.19.67-1 (Debian proposed-updates).

+mathias.nyman@intel.com, linux-usb@vger.kernel.org
linux-ext4 to BCC

That's a USB XHCI issue, not an ext4 issue.  I'm handing this to the
XHCI maintainer and the Linux USB mailing list.

Cheers,

						- Ted

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: fsck on ext4: "WARN Wrong bounce buffer write length: 1024 != 0"
  2019-08-27 16:35 ` fsck on ext4: "WARN Wrong bounce buffer write length: 1024 != 0" Theodore Y. Ts'o
@ 2019-08-28  7:57   ` Mathias Nyman
  2019-08-29  7:51     ` Harald Dunkel
  0 siblings, 1 reply; 3+ messages in thread
From: Mathias Nyman @ 2019-08-28  7:57 UTC (permalink / raw)
  To: Theodore Y. Ts'o, Harald Dunkel; +Cc: mathias.nyman, linux-usb

On 27.8.2019 19.35, Theodore Y. Ts'o wrote:
> On Tue, Aug 27, 2019 at 08:00:14AM +0200, Harald Dunkel wrote:
>> FYI: "fsck -y" on an external USB drive (USB-C, ext4) gave
>> me a ton of messages
>>
>> :
>> [  191.261939] xhci_hcd 0000:05:00.0: WARN Wrong bounce buffer write length: 1024 != 0
>> [  191.263743] xhci_hcd 0000:05:00.0: WARN Wrong bounce buffer write length: 1024 != 0
>> [  191.263788] xhci_hcd 0000:05:00.0: WARN Wrong bounce buffer write length: 1024 != 0
>> [  191.263840] xhci_hcd 0000:05:00.0: WARN Wrong bounce buffer write length: 1024 != 0
>> [  191.266857] xhci_hcd 0000:05:00.0: WARN Wrong bounce buffer write length: 1024 != 0
>> :
>>
>> Related to 597c56e372dab2c7f79b8d700aad3a5deebf9d1b, AFAICT.
>>
>> Kernel is 4.19.67-1 (Debian proposed-updates).
> 
> +mathias.nyman@intel.com, linux-usb@vger.kernel.org
> linux-ext4 to BCC
> 
> That's a USB XHCI issue, not an ext4 issue.  I'm handing this to the
> XHCI maintainer and the Linux USB mailing list.
> 

The warning message is incorrect, data should be fine.

Looks like this length check code was copied from the read side to the write side,
but some details were not updated.

Below code should fix it:

--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -3202,10 +3202,10 @@ static int xhci_align_td(struct xhci_hcd *xhci, struct urb *urb, u32 enqd_len,
         if (usb_urb_dir_out(urb)) {
                 len = sg_pcopy_to_buffer(urb->sg, urb->num_sgs,
                                    seg->bounce_buf, new_buff_len, enqd_len);
-               if (len != seg->bounce_len)
+               if (len != new_buff_len)
                         xhci_warn(xhci,
                                 "WARN Wrong bounce buffer write length: %zu != %d\n",
-                               len, seg->bounce_len);
+                               len, new_buff_len);
                 seg->bounce_dma = dma_map_single(dev, seg->bounce_buf,
                                                  max_pkt, DMA_TO_DEVICE);
         } else {

   

I'll submit a proper patch

-Mathias

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: fsck on ext4: "WARN Wrong bounce buffer write length: 1024 != 0"
  2019-08-28  7:57   ` Mathias Nyman
@ 2019-08-29  7:51     ` Harald Dunkel
  0 siblings, 0 replies; 3+ messages in thread
From: Harald Dunkel @ 2019-08-29  7:51 UTC (permalink / raw)
  To: Mathias Nyman, Theodore Y. Ts'o; +Cc: mathias.nyman, linux-usb

On 8/28/19 9:57 AM, Mathias Nyman wrote:
> 
> I'll submit a proper patch
> 
> -Mathias
> 

Thanx very much
Harri

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-08-29  7:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <22367f07-3448-f771-0363-b5c6f500b77d@aixigo.com>
2019-08-27 16:35 ` fsck on ext4: "WARN Wrong bounce buffer write length: 1024 != 0" Theodore Y. Ts'o
2019-08-28  7:57   ` Mathias Nyman
2019-08-29  7:51     ` Harald Dunkel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).