Skip to content

Commit b9f5b61

Browse files
pelwellherrnst
authored andcommitted
Revert "usb: xhci: expand the scope of XHCI_VLI_SS_BULK_OUT_BUG"
This reverts commit 40686d8. See: raspberrypi#4930 Signed-off-by: Phil Elwell <[email protected]>
1 parent 257b068 commit b9f5b61

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
@@ -1393,12 +1393,9 @@ static void xhci_unmap_temp_buf(struct usb_hcd *hcd, struct urb *urb)
13931393
static int xhci_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb,
13941394
gfp_t mem_flags)
13951395
{
1396-
unsigned int i, maxpacket;
1397-
struct scatterlist *sg;
13981396
struct xhci_hcd *xhci;
13991397

14001398
xhci = hcd_to_xhci(hcd);
1401-
maxpacket = usb_endpoint_maxp(&urb->ep->desc);
14021399

14031400
if (xhci_urb_suitable_for_idt(urb))
14041401
return 0;
@@ -1407,16 +1404,6 @@ static int xhci_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb,
14071404
if (xhci_urb_temp_buffer_required(hcd, urb))
14081405
return xhci_map_temp_buffer(hcd, urb);
14091406
}
1410-
1411-
if (xhci->quirks & XHCI_VLI_SS_BULK_OUT_BUG &&
1412-
usb_endpoint_is_bulk_out(&urb->ep->desc) &&
1413-
urb->dev->speed >= USB_SPEED_SUPER &&
1414-
urb->transfer_buffer_length != 0) {
1415-
for_each_sg(urb->sg, sg, urb->num_sgs, i) {
1416-
if (sg->length % maxpacket)
1417-
return xhci_map_temp_buffer(hcd, urb);
1418-
}
1419-
}
14201407
return usb_hcd_map_urb_for_dma(hcd, urb, mem_flags);
14211408
}
14221409

@@ -1430,8 +1417,7 @@ static void xhci_unmap_urb_for_dma(struct usb_hcd *hcd, struct urb *urb)
14301417
if (urb->num_sgs && (urb->transfer_flags & URB_DMA_MAP_SINGLE))
14311418
unmap_temp_buf = true;
14321419

1433-
if ((xhci->quirks & (XHCI_SG_TRB_CACHE_SIZE_QUIRK | XHCI_VLI_SS_BULK_OUT_BUG))
1434-
&& unmap_temp_buf)
1420+
if ((xhci->quirks & XHCI_SG_TRB_CACHE_SIZE_QUIRK) && unmap_temp_buf)
14351421
xhci_unmap_temp_buf(hcd, urb);
14361422
else
14371423
usb_hcd_unmap_urb_for_dma(hcd, urb);

0 commit comments

Comments
 (0)