Re: [PATCH 6/11] USB: remove unneeded WARN_ON

David Brownell <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Thursday 05 April 2007 1:07 pm, Alan Stern wrote:
> This patch (as883) removes an out-of-date WARN_ON from the main HCD
> endpoint-disable routine.  The warning is triggered whenever an
> endpoint is disabled while the root hub is suspended.  In the past
> that may not have been legal, but it definitely is legal now.  Merely
> unbinding a USB driver will do it.
> 
> Furthermore, I've never seen any occurrences of this warning that
> really did signal an actual bug or error condition.  At this point it
> has outlived its purpose.
> 
> Signed-off-by: Alan Stern <[email protected]>

Signed-off-by: David Brownell <[email protected]>


I thought most of those warnings were long gone.  ;)



> ---
> 
> Index: usb-2.6/drivers/usb/core/hcd.c
> ===================================================================
> --- usb-2.6.orig/drivers/usb/core/hcd.c
> +++ usb-2.6/drivers/usb/core/hcd.c
> @@ -1175,10 +1175,6 @@ void usb_hcd_endpoint_disable (struct us
>  	struct urb		*urb;
>  
>  	hcd = bus_to_hcd(udev->bus);
> -
> -	WARN_ON (!HC_IS_RUNNING (hcd->state) && hcd->state != HC_STATE_HALT &&
> -			udev->state != USB_STATE_NOTATTACHED);
> -
>  	local_irq_disable ();
>  
>  	/* ep is already gone from udev->ep_{in,out}[]; no more submits */
> 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.