| 
					
				 | 
			
			
				@@ -26,7 +26,7 @@ Signed-off-by: Jonathan Bell <[email protected]> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 --- a/drivers/usb/host/xhci-pci.c 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 +++ b/drivers/usb/host/xhci-pci.c 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-@@ -295,6 +295,7 @@ static void xhci_pci_quirks(struct devic 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+@@ -298,6 +298,7 @@ static void xhci_pci_quirks(struct devic 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  		xhci->quirks |= XHCI_EP_CTX_BROKEN_DCS; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  		xhci->quirks |= XHCI_AVOID_DQ_ON_LINK; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  		xhci->quirks |= XHCI_VLI_TRB_CACHE_BUG; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -36,7 +36,7 @@ Signed-off-by: Jonathan Bell <[email protected]> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  	if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 --- a/drivers/usb/host/xhci-ring.c 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 +++ b/drivers/usb/host/xhci-ring.c 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-@@ -3614,14 +3614,15 @@ int xhci_queue_bulk_tx(struct xhci_hcd * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+@@ -3617,14 +3617,15 @@ int xhci_queue_bulk_tx(struct xhci_hcd * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  	unsigned int num_trbs; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  	unsigned int start_cycle, num_sgs = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  	unsigned int enqd_len, block_len, trb_buff_len, full_len; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -54,7 +54,7 @@ Signed-off-by: Jonathan Bell <[email protected]> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  	full_len = urb->transfer_buffer_length; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  	/* If we have scatter/gather list, we use it. */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  	if (urb->num_sgs && !(urb->transfer_flags & URB_DMA_MAP_SINGLE)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-@@ -3658,6 +3659,17 @@ int xhci_queue_bulk_tx(struct xhci_hcd * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+@@ -3661,6 +3662,17 @@ int xhci_queue_bulk_tx(struct xhci_hcd * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  	start_cycle = ring->cycle_state; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  	send_addr = addr; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -72,7 +72,7 @@ Signed-off-by: Jonathan Bell <[email protected]> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  	/* Queue the TRBs, even if they are zero-length */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  	for (enqd_len = 0; first_trb || enqd_len < full_len; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  			enqd_len += trb_buff_len) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-@@ -3670,6 +3682,11 @@ int xhci_queue_bulk_tx(struct xhci_hcd * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+@@ -3673,6 +3685,11 @@ int xhci_queue_bulk_tx(struct xhci_hcd * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  		if (enqd_len + trb_buff_len > full_len) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  			trb_buff_len = full_len - enqd_len; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -86,7 +86,7 @@ Signed-off-by: Jonathan Bell <[email protected]> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  			first_trb = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 --- a/drivers/usb/host/xhci.h 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 +++ b/drivers/usb/host/xhci.h 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-@@ -1908,6 +1908,7 @@ struct xhci_hcd { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+@@ -1909,6 +1909,7 @@ struct xhci_hcd { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  #define XHCI_RESET_TO_DEFAULT	BIT_ULL(44) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  #define XHCI_AVOID_DQ_ON_LINK	BIT_ULL(45) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  #define XHCI_VLI_TRB_CACHE_BUG	BIT_ULL(46) 
			 |