qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 3/3] ioh3420: Support ARI forwarding


From: Knut Omang
Subject: Re: [Qemu-devel] [PATCH 3/3] ioh3420: Support ARI forwarding
Date: Wed, 20 Aug 2014 12:18:43 +0200

On Wed, 2014-08-20 at 09:02 +0000, Gonglei (Arei) wrote:
> > >  static int ioh3420_initfn(PCIDevice *d)
> > >  {
> > > +    PCIBridge* br = PCI_BRIDGE(d);
> > >      PCIEPort *p = PCIE_PORT(d);
> > >      PCIESlot *s = PCIE_SLOT(d);
> > > +    uint8_t *exp_cap;
> > >      int rc;
> > >      char tmp[100];
> > >      sprintf(tmp, "pcie_port.%d", s->slot);
> > > @@ -121,6 +123,10 @@ static int ioh3420_initfn(PCIDevice *d)
> > >      if (rc < 0) {
> > >          goto err_msi;
> > >      }
> > > +    /* Support ARI forwarding */
> > > +    exp_cap = d->config + d->exp.exp_cap;
> > > +    pci_word_test_and_set_mask(exp_cap + PCI_EXP_DEVCAP2,
> > PCI_EXP_DEVCAP2_ARI);
> > > +
> > Hi,
> > 
> > I think is better to move the implementation to a function, say
> > pcie_cap_ari_init
> > and place it into hw/pci/pcie.c so other devices like downstream ports can 
> > use
> > it.
> > 
> Yes, good idea. And I noticed a function ioh3420_init(), but not be called.
> Maybe it is useful.

Yes, I noticed too - I would guess this is something left over from an
earlier stage of the qdev APIs - Isaku, should I add a patch to remove
it while at this?

> Best regards,
> -Gonglei
> 





reply via email to

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