qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 5/7] pci: make use of qdev reset frame work to p


From: Michael S. Tsirkin
Subject: [Qemu-devel] Re: [PATCH 5/7] pci: make use of qdev reset frame work to pci bus reset.
Date: Thu, 18 Nov 2010 10:58:35 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Nov 18, 2010 at 05:22:50PM +0900, Isaku Yamahata wrote:
> 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.

Yes. However devices don't seem to override pci reset behavior
- instead they want a callback to reset the devicestate fields.

> But it seems you don't think so.  I can drop the following patch(6/7)
> and eliminate this TODO comment.

Yes, if everyone just calls default reset, let's invoke it from common
core. If we see some devices not call common reset, that's when we
better move it.

-- 
MST




reply via email to

[Prev in Thread] Current Thread [Next in Thread]