tech-kern archive

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

Re: argument of pci_msi[x]_count()



On Thu, Aug 13, 2015 at 06:56:34AM +1000, matthew green wrote:
> > I don't have a problem with it, I was just questioning the rationale
> > about passing pci_attach_args to functions...
> 
> the original pci(9) interfaces didn't do this, but a 3rd member of
> pci_attach_args{} was needed for a new change, so someone (i forget
> now, but CVS will tell you) changed it to pass the structure itself,
> since this was only called during autoconfig when this structure was
> actually available.
> 
> doing it outside of autoconfig is not a good idea, though, so any
> function that is usefully callable outside of attach probably should
> take specific arguments instead of pci_attach_args{}.

ISTR a hairy wi(4) bug came about because *_attach_args was passed
outside attach!  [I may have introduced that bug, too. :-)]

It sounds to me like the emerging consensus is that it's best to pass
only the chipset+memory tag, if that's all you need, to each MSI/MSI-X
function.

Dave

-- 
David Young
dyoung%pobox.com@localhost    Urbana, IL    (217) 721-9981


Home | Main Index | Thread Index | Old Index