USB hub: Minor fix to reduce the amount of debug garbage on console in certain configurations

This commit is contained in:
Gregory Nutt 2015-04-30 13:03:28 -06:00
parent 9f34a34d8c
commit e4f538446b
2 changed files with 13 additions and 3 deletions

View File

@ -1161,13 +1161,23 @@ static void usbhost_callback(FAR void *arg, int result)
* transfer will pend until data is available (OHCI and EHCI). On lower * transfer will pend until data is available (OHCI and EHCI). On lower
* end host controllers (like STM32 and EFM32), the transfer will fail * end host controllers (like STM32 and EFM32), the transfer will fail
* immediately when the device NAKs the first attempted interrupt IN * immediately when the device NAKs the first attempted interrupt IN
* transfer (with result == EGAIN). In that case (or in the case of * transfer (with result == EAGAIN). In that case (or in the case of
* other errors), we must fall back to polling. * other errors), we must fall back to polling.
*/ */
if (result != OK) if (result != OK)
{
/* This debug output is good to know, but really a nuisance for
* those configurations where we have to fall back to polling.
* FIX: Don't output the message is the result is EAGAIN.
*/
#if defined(CONFIG_DEBUG_USB) && !defined(CONFIG_DEBUG_VERBOSE)
if (result != EAGAIN)
#endif
{ {
ulldbg("ERROR: Transfer failed: %d\n", result); ulldbg("ERROR: Transfer failed: %d\n", result);
}
/* Indicate there there is nothing to do. So when the work is /* Indicate there there is nothing to do. So when the work is
* performed, nothing will happen other than we will set to receive * performed, nothing will happen other than we will set to receive