xhci: fix wrong WARN messages for bounce buffer
Subsystems (2)
PATCH 1/1 xhci: fix wrong WARN messages for bounce buffer
This change fixes below wrong warning messages:
[ 173.473153] xhci-hcd xhci-hcd.0.auto: WARN Wrong bounce buffer write length: 1024 != 990 [ 173.530633] xhci-hcd xhci-hcd.0.auto: WARN Wrong bounce buffer write length: 490 != 1014 [ 173.541598] xhci-hcd xhci-hcd.0.auto: WARN Wrong bounce buffer write length: 490 != 1024 [ 173.619507] xhci-hcd xhci-hcd.0.auto: WARN Wrong bounce buffer write length: 1024 != 490 [ 173.631982] xhci-hcd xhci-hcd.0.auto: WARN Wrong bounce buffer write length: 1024 != 490 [ 173.654629] xhci-hcd xhci-hcd.0.auto: WARN Wrong bounce buffer write length: 108 != 1024 [ 173.750209] xhci-hcd xhci-hcd.0.auto: WARN Wrong bounce buffer write length: 1024 != 108
Signed-off-by Henry Lin <[email protected]>
--- drivers/usb/host/xhci-ring.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/host/xhci-ring.c +2 -2
@@ -3177,10 +3177,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 {
Signature · 1 line
2.7.4