Received: from [140.186.70.92] (port=57677 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PIzle-0006fD-A6 for qemu-devel@nongnu.org; Thu, 18 Nov 2010 03:22:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PIzld-0007vY-Df for qemu-devel@nongnu.org; Thu, 18 Nov 2010 03:22:54 -0500 Received: from mail.valinux.co.jp ([210.128.90.3]:53419) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PIzld-0007vQ-3C for qemu-devel@nongnu.org; Thu, 18 Nov 2010 03:22:53 -0500 Date: Thu, 18 Nov 2010 17:22:50 +0900 From: Isaku Yamahata Message-ID: <20101118082250.GT18102@valinux.co.jp> References: <7fbd22f342e9b064c43743979fe831ac9d7453fc.1289969012.git.yamahata@valinux.co.jp> <20101118070235.GA15274@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101118070235.GA15274@redhat.com> Subject: [Qemu-devel] Re: [PATCH 5/7] pci: make use of qdev reset frame work to pci bus reset. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: skandasa@cisco.com, Anthony Liguori , etmartin@cisco.com, qemu-devel@nongnu.org, wexu2@cisco.com On Thu, Nov 18, 2010 at 09:02:35AM +0200, Michael S. Tsirkin wrote: > > + /* > > + * TODO: > > + * each device should know what to do on RST#. > > + * move pci_device_reset_default() into each callback. > > + */ > > Is this doing anything besides give devices another way to shoot > themselves in the foot? Handling this all in one place seems easier, > assuming everyone just calls pci_device_reset_default in the end. Or do > you expect some devices to avoid calling pci_device_reset_default? I think only single function per a device should know all about reset behavior and if a device overrides reset behavior, it should take care of itself fully. But it seems you don't think so. I can drop the following patch(6/7) and eliminate this TODO comment. -- yamahata