Re: [PATCH 1/6] PCI Express Advanced Error Reporting Driver

Grant Grundler
2005-03-15T23:13:15Z

On Tue, Mar 15, 2005 at 04:51:01PM -0600, Linas Vepstas wrote:
> Hi,
>
> On Fri, Mar 11, 2005 at 04:12:18PM -0800, long was heard to remark:
>
> > +void hw_aer_unregister(void)
> > +{
> > + struct pci_dev *dev = (struct pci_dev*)host->dev;

I'm more nervous about "host" being defined as a global
instead of being passed in. I've not review the
other code and don't know if that's safe.

> > + unsigned short id;
> > +
> > + id = (dev->bus->number << 8) | dev->devfn;
> > +
> > + /* Unregister with AER Root driver */
> > + pcie_aer_unregister(id);
> > +}
>
> I don't understand how this can work on a system with
> more than one domain. On any midrange/high-end system,
> you'll have a number of devices with identical values
> for (bus->number << 8) | devfn)

Yes - this is an error reported within a particular domain.
I'm expecting host-> to refer to a particular domain.
Maybe it doesn't?

[ example deleted ]

> Or am I being stupid/dense/all-of-the-above?

Probably not.

grant

>
> --linas