Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754038AbZBAAmS (ORCPT ); Sat, 31 Jan 2009 19:42:18 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752124AbZBAAl7 (ORCPT ); Sat, 31 Jan 2009 19:41:59 -0500 Received: from ogre.sisk.pl ([217.79.144.158]:54887 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751517AbZBAAl7 (ORCPT ); Sat, 31 Jan 2009 19:41:59 -0500 From: "Rafael J. Wysocki" To: Linus Torvalds Subject: Re: 2.6.29-rc3: tg3 dead after resume Date: Sun, 1 Feb 2009 01:41:29 +0100 User-Agent: KMail/1.10.3 (Linux/2.6.29-rc2-tst; KDE/4.1.3; x86_64; ; ) Cc: Parag Warudkar , Matt Carlson , "netdev@vger.kernel.org" , Linux Kernel Mailing List , "David S. Miller" , Andrew Morton References: <200902010111.08433.rjw@sisk.pl> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200902010141.30594.rjw@sisk.pl> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2155 Lines: 51 On Sunday 01 February 2009, Linus Torvalds wrote: > > On Sun, 1 Feb 2009, Rafael J. Wysocki wrote: > > > The problems happen on purely the suspend path. How the f*ck do you know > > > that the drivers behind the bridge don't do everything at 'suspend_late' > > > time, and expect to be working up until that time? > > > > DMA from suspend_late? Come on. > > Rafael. Stop being a total idiot. > > Read what I wrote. > > I'm saying that the driver may not do anything at all at suspend() time, > and leaves everything until suspend_late. Then, at suspend_late(), it > finally really shuts down. > > That's actually a very reasonable thing to do in some circumstances. It > simplifies everything, in particular all interrupt handling, since the > device is now fully live all the way while interrupts can happen. > > For a USB host controller, for example, it really could make sense to do > that - just leave all the core host controller stuff running, and the only > thing the "suspend()" callback does is to send the commands to the actual > devices, it doesn't necessarily touch the host controller itself at all. > > Then, at suspend_late time, you just clear the "running" bit in the > controller (and perhaps not even that - because you want to still push > things out for debugging). End result: you never actually had to shut > anything down at all, and you could (for example) still run a USB serial > port console all the way to shutdown. > > And yes, I wanted to do basically exactly that when I was debugging some > issues a year or two ago. > > See? The device and driver may be totally alive over a ->suspend() call. > And that means that the bridge CANNOT KNOW that it's ok to shut down DMA. > Because DMA may be the only way the device communicates (again: USB > actually works that way). > > So dammit, just admit that you were wrong, I said I was. Thanks, Rafael -- 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/