Skip to content

Commit 3fd191e

Browse files
pelwellpopcornmix
authored andcommitted
Revert "usb: xhci: expand the scope of XHCI_VLI_SS_BULK_OUT_BUG"
This reverts commit 40686d8. See: #4930 Signed-off-by: Phil Elwell <[email protected]>
1 parent 366f4ea commit 3fd191e

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

drivers/usb/host/xhci.c

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,12 +1404,9 @@ static void xhci_unmap_temp_buf(struct usb_hcd *hcd, struct urb *urb)
14041404
static int xhci_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb,
14051405
gfp_t mem_flags)
14061406
{
1407-
unsigned int i, maxpacket;
1408-
struct scatterlist *sg;
14091407
struct xhci_hcd *xhci;
14101408

14111409
xhci = hcd_to_xhci(hcd);
1412-
maxpacket = usb_endpoint_maxp(&urb->ep->desc);
14131410

14141411
if (xhci_urb_suitable_for_idt(urb))
14151412
return 0;
@@ -1418,16 +1415,6 @@ static int xhci_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb,
14181415
if (xhci_urb_temp_buffer_required(hcd, urb))
14191416
return xhci_map_temp_buffer(hcd, urb);
14201417
}
1421-
1422-
if (xhci->quirks & XHCI_VLI_SS_BULK_OUT_BUG &&
1423-
usb_endpoint_is_bulk_out(&urb->ep->desc) &&
1424-
urb->dev->speed >= USB_SPEED_SUPER &&
1425-
urb->transfer_buffer_length != 0) {
1426-
for_each_sg(urb->sg, sg, urb->num_sgs, i) {
1427-
if (sg->length % maxpacket)
1428-
return xhci_map_temp_buffer(hcd, urb);
1429-
}
1430-
}
14311418
return usb_hcd_map_urb_for_dma(hcd, urb, mem_flags);
14321419
}
14331420

@@ -1441,8 +1428,7 @@ static void xhci_unmap_urb_for_dma(struct usb_hcd *hcd, struct urb *urb)
14411428
if (urb->num_sgs && (urb->transfer_flags & URB_DMA_MAP_SINGLE))
14421429
unmap_temp_buf = true;
14431430

1444-
if ((xhci->quirks & (XHCI_SG_TRB_CACHE_SIZE_QUIRK | XHCI_VLI_SS_BULK_OUT_BUG))
1445-
&& unmap_temp_buf)
1431+
if ((xhci->quirks & XHCI_SG_TRB_CACHE_SIZE_QUIRK) && unmap_temp_buf)
14461432
xhci_unmap_temp_buf(hcd, urb);
14471433
else
14481434
usb_hcd_unmap_urb_for_dma(hcd, urb);

0 commit comments

Comments
 (0)