Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S265076AbTIJAXo (ORCPT ); Tue, 9 Sep 2003 20:23:44 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S265083AbTIJAXo (ORCPT ); Tue, 9 Sep 2003 20:23:44 -0400 Received: from gprs150-72.eurotel.cz ([160.218.150.72]:4992 "EHLO amd.ucw.cz") by vger.kernel.org with ESMTP id S265076AbTIJAXm (ORCPT ); Tue, 9 Sep 2003 20:23:42 -0400 Date: Wed, 10 Sep 2003 02:19:56 +0200 From: Pavel Machek To: Patrick Mochel Cc: Linux usb mailing list , kernel list Subject: [PATCH] Re: Driver model problems in -test5: usb this time Message-ID: <20030910001955.GF217@elf.ucw.cz> References: <20030909230118.GF211@elf.ucw.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Warning: Reading this can be dangerous to your mental health. User-Agent: Mutt/1.5.3i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1642 Lines: 58 Hi! > > > The latter two functions do not exist in -test5. It would helpful if you > > > tried to reproduce with a virgin -test5. It would be courteous to state > > > what patches you applied on top of the virgin -test5 kernel. > > > > Lot of them, but only "revert to -test3 swsusp" should be important > > here. > > Then all bets are off. I cannot expect to reproduce the problems until you > narrow down which patch causes the problem or verify that it appears on a > standard kernel release. Here's patch that should fix it. [First part of first hunk defitely triggered twice during suspend, and made machine survive that.] Please apply, Pavel --- clean/drivers/usb/core/usb.c 2003-09-09 12:45:35.000000000 +0200 +++ linux/drivers/usb/core/usb.c 2003-09-10 02:16:10.000000000 +0200 @@ -1429,9 +1429,11 @@ return 0; intf = to_usb_interface(dev); + if (!dev->driver) + return 0; driver = to_usb_driver(dev->driver); - if (driver && driver->suspend) + if (driver->suspend) return driver->suspend(intf, state); return 0; } @@ -1446,9 +1448,11 @@ return 0; intf = to_usb_interface(dev); + if (!dev->driver) + return 0; driver = to_usb_driver(dev->driver); - if (driver && driver->resume) + if (driver->resume) return driver->resume(intf); return 0; } -- When do you have a heart between your knees? [Johanka's followup: and *two* hearts?] - 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/