RE: [PATCH 2/3] EHCI: keep track of ports being resumed and indicate in hub_status_data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 
 
> @@ -554,16 +549,12 @@ static int
>  ehci_hub_status_data (struct usb_hcd *hcd, char *buf)
>  {
>  	struct ehci_hcd	*ehci = hcd_to_ehci (hcd);
> -	u32		temp, status = 0;
> +	u32		temp, status;
>  	u32		mask;
>  	int		ports, i, retval = 1;
>  	unsigned long	flags;
>  	u32		ppcd = 0;
> 
> -	/* if !USB_SUSPEND, root hub timers won't get shut down ... */
> -	if (ehci->rh_state != EHCI_RH_RUNNING)
> -		return 0;
> -
>  	/* init status to no-changes */
>  	buf [0] = 0;
>  	ports = HCS_N_PORTS (ehci->hcs_params);
> @@ -572,6 +563,11 @@ ehci_hub_status_data (struct usb_hcd *hc
>  		retval++;
>  	}
> 
> +	/* Inform the core about resumes-in-progress by returning
> +	 * a non-zero value even if there are no status changes.
> +	 */
> +	status = ehci->resuming_ports;
> +
How about adding the code after spin_lock_irqsave (&ehci->lock, flags), it can increase
the coverage.

 


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux