Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752539AbXLaFYZ (ORCPT ); Mon, 31 Dec 2007 00:24:25 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752590AbXLaFYI (ORCPT ); Mon, 31 Dec 2007 00:24:08 -0500 Received: from pentafluge.infradead.org ([213.146.154.40]:60168 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753868AbXLaFYE (ORCPT ); Mon, 31 Dec 2007 00:24:04 -0500 Date: Sun, 30 Dec 2007 21:25:00 -0800 From: Greg KH To: Alan Stern Cc: Andreas Mohr , Ingo Molnar , Alexey Dobriyan , Andrew Morton , David Woodhouse , "Eric W. Biederman" , Linus Torvalds , "Rafael J. Wysocki" , Pavel Machek , kernel list , netdev , Pavel Emelyanov , "Denis V. Lunev" Subject: Re: [usb regression] Re: [PATCH 2.6.24-rc3] Fix /proc/net breakage Message-ID: <20071231052500.GB4187@kroah.com> References: <20071230161405.GA27788@elte.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.16 (2007-06-09) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2570 Lines: 75 On Sun, Dec 30, 2007 at 03:34:45PM -0500, Alan Stern wrote: > On Sun, 30 Dec 2007, Ingo Molnar wrote: > > > * Andreas Mohr wrote: > > > > > (yes, that's all there is, despite CONFIG_USB_DEBUG being set) > > > > > > The LED of a usb stick isn't active either, for obvious reasons. > > > > > > And keep in mind that this is a (relatively old) OHCI-only machine... > > > (which had the 2.6.19 lsmod showing ohci-hcd just fine and working > > > fine with WLAN USB) > > > > > > Now pondering whether to try -rc6 proper or whether to revert specific > > > guilty-looking USB changes... And wondering how to properly elevate > > > this issue (prompt Greg about it, new thread, bug #, ...?) > > It looks like Greg misused the debugfs API -- which is ironic, because > he wrote debugfs in the first place! :-) Oh crap, sorry, I did mess that up :( > Let me know if this patch fixes the problem. If it does, I'll submit > it to Greg with all the proper accoutrements. This isn't going to work if CONFIG_DEBUGFS is not enabled either :( > Index: 2.6.24-rc6-mm1/drivers/usb/host/ohci-hcd.c > =================================================================== > --- 2.6.24-rc6-mm1.orig/drivers/usb/host/ohci-hcd.c > +++ 2.6.24-rc6-mm1/drivers/usb/host/ohci-hcd.c > @@ -1067,14 +1067,8 @@ static int __init ohci_hcd_mod_init(void > > #ifdef DEBUG > ohci_debug_root = debugfs_create_dir("ohci", NULL); > - if (!ohci_debug_root || IS_ERR(ohci_debug_root)) { > - if (!ohci_debug_root) > - retval = -ENOENT; > - else > - retval = PTR_ERR(ohci_debug_root); > - > - goto error_debug; > - } > + if (!ohci_debug_root) > + return -ENOENT; It needs to check for ERR_PTR(-ENODEV) which is the return value if debugfs is not enabled, and if so, just ignore things. If NULL is returned, or anything else, it's a real error. So, try something like: if (!ohci_debug_root) { retval = -ENOENT; goto error_debug; } if (IS_ERR(ohci_debug_root) && PTR_ERR(ohci_debug_root) != -ENODEV) { retval = PTR_ERR(ohci_debug_root); goto error_debug; } and let me know of that works for you. Although the combination of CONFIG_USB_DEBUG and not CONFIG_DEBUGFS is strange, we could just enable CONFIG_DEBUGFS is USB_DEBUG is enabled and then simplify this logic a bunch at the same time. thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/