ChangeSet 1.1002.3.3, 2003/02/20 10:17:46-08:00, david-b@pacbell.net [PATCH] USB: ohci-hcd fewer diagnostics This gets rid of some potentially scarey messages I've recently seen on disconnect, "bad hash" for a TD ... it's really a "no hash" case, and this prevents the message in some cases where that's not an issue. Likely this is what Gary Gorgen noticed, but even he had a different problem, this message shouldn't always appear. It also slims down one other message, preventing it from appearing in the routine "protocol stall" case (and cluttering logfiles). drivers/usb/host/ohci-mem.c | 4 ++-- drivers/usb/host/ohci-q.c | 20 ++++++++++++-------- 2 files changed, 14 insertions(+), 10 deletions(-) diff -Nru a/drivers/usb/host/ohci-mem.c b/drivers/usb/host/ohci-mem.c --- a/drivers/usb/host/ohci-mem.c Fri Feb 28 14:51:57 2003 +++ b/drivers/usb/host/ohci-mem.c Fri Feb 28 14:51:57 2003 @@ -115,8 +115,8 @@ prev = &(*prev)->td_hash; if (*prev) *prev = td->td_hash; - else - ohci_dbg (hc, "bad hash for td %p\n", td); + else if ((td->hwINFO & TD_DONE) != 0) + ohci_dbg (hc, "no hash for td %p\n", td); pci_pool_free (hc->td_cache, td, td->td_dma); } diff -Nru a/drivers/usb/host/ohci-q.c b/drivers/usb/host/ohci-q.c --- a/drivers/usb/host/ohci-q.c Fri Feb 28 14:51:57 2003 +++ b/drivers/usb/host/ohci-q.c Fri Feb 28 14:51:57 2003 @@ -783,14 +783,18 @@ ed->hwHeadP = next->hwNextTD | toggle; } - /* help for troubleshooting: */ - ohci_dbg (ohci, - "urb %p usb-%s-%s ep-%d-%s cc %d --> status %d\n", - urb, - urb->dev->bus->bus_name, urb->dev->devpath, - usb_pipeendpoint (urb->pipe), - usb_pipein (urb->pipe) ? "IN" : "OUT", - cc, cc_to_error [cc]); + /* help for troubleshooting: report anything that + * looks odd ... that doesn't include protocol stalls + * (or maybe some other things) + */ + if (cc != TD_CC_STALL || !usb_pipecontrol (urb->pipe)) + ohci_dbg (ohci, + "urb %p path %s ep%d%s %08x cc %d --> status %d\n", + urb, urb->dev->devpath, + usb_pipeendpoint (urb->pipe), + usb_pipein (urb->pipe) ? "in" : "out", + le32_to_cpu (td->hwINFO), + cc, cc_to_error [cc]); return rev; }