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