mirror of https://github.com/OpenIPC/firmware.git
				
				
				
			
		
			
				
	
	
		
			26 lines
		
	
	
		
			759 B
		
	
	
	
		
			Diff
		
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			759 B
		
	
	
	
		
			Diff
		
	
	
| --- linux-4.9.37/drivers/usb/host/xhci-hub.c	2017-07-12 16:42:41.000000000 +0300
 | |
| +++ linux-4.9.y/drivers/usb/host/xhci-hub.c	2021-06-07 13:01:34.000000000 +0300
 | |
| @@ -1049,13 +1049,15 @@
 | |
|  				break;
 | |
|  			}
 | |
|  
 | |
| -			/* Software should not attempt to set
 | |
| -			 * port link state above '3' (U3) and the port
 | |
| -			 * must be enabled.
 | |
| -			 */
 | |
| -			if ((temp & PORT_PE) == 0 ||
 | |
| -				(link_state > USB_SS_PORT_LS_U3)) {
 | |
| -				xhci_warn(xhci, "Cannot set link state.\n");
 | |
| +			/* port must be enabled */
 | |
| +			if (!(temp & PORT_PE)) {
 | |
| +				retval = -ENODEV;
 | |
| +				break;
 | |
| +			}
 | |
| +			/* Can't set port link state above '3' (U3)*/
 | |
| +			if (link_state > USB_SS_PORT_LS_U3) {
 | |
| +				xhci_warn(xhci, "Cannot set port %d link state %d\n",
 | |
| +						wIndex, link_state);
 | |
|  				goto error;
 | |
|  			}
 | |
|  
 |