On Tue, Nov 02, 2010 at 02:57:12PM +0200, Michael S. Tsirkin wrote: > > + pcie_add_capability(dev, PCI_EXT_CAP_ID_ERR, PCI_ERR_VER, > > + offset, PCI_ERR_SIZEOF); > > + exp = &dev->exp; > > + exp->aer_cap = offset; > > + if (dev->exp.aer_log.log_max == PCIE_AER_LOG_MAX_UNSET) { > > + dev->exp.aer_log.log_max = PCIE_AER_LOG_MAX_DEFAULT; > > + } > > + if (dev->exp.aer_log.log_max > PCIE_AER_LOG_MAX_MAX) { > > + dev->exp.aer_log.log_max = PCIE_AER_LOG_MAX_MAX; > > + } > > So someone should set log_max beforehand? And an illegal value is > rounded down? How is this API supposed to be used?
It's qdev property. If log_max is too big, should it return error instead of silently rounding down? -- yamahata