Hi,

On Wed, 17 Jun 2015 12:36:14 +0300, marcel.apfelb...@gmail.com wrote:
> > NOTE:
> > Not sure if my statement regarding ommitting 'config_write' holds
> > for the megasas case:
> > It's parent is TYPE_MEGASAS_BASE whose parent is TYPE_PCI_DEVICE.
> > Can we assume 'config_write' will be set to
> > 'pci_default_write_config' in this case?
> No need to assume here, you can simply add a trace and check.
> However, the do_pci_register_device method assigns config_write method
> to PCIDevice *instances* using the class method or the default
> pci_default_write_config.
> 
> Since TYPE_MEGASAS_BASE does not define a config_write method, the
> field will remain NULL. Anyway, you are welcomed to run it and
> double-check.

Verified; do_pci_register_device indeed sets it to pci_default_write_config.

Thanks,
Shmulik

Reply via email to