[openib-general] [PATCH 1/6] Add pci_find_ht_capability() for finding Hypertransport capabilities

Michael Ellerman michael at ellerman.id.au
Sun Nov 12 22:05:05 PST 2006


On Thu, 2006-11-09 at 09:01 +0100, Segher Boessenkool wrote:
> > +int pci_find_next_ht_capability(struct pci_dev *dev, int pos, int  
> > ht_cap)
> > +{
> > +	int rc;
> > +	u8 cap, mask;
> > +
> > +	if (ht_cap == HT_CAPTYPE_SLAVE || ht_cap == HT_CAPTYPE_HOST)
> > +		mask = HT_3BIT_CAP_MASK;
> > +	else
> > +		mask = HT_5BIT_CAP_MASK;
> > +
> 
> +	pos = pci_find_next_capability(dev, pos, PCI_CAP_ID_HT);
> 
> or the caller will loop forever if a second same type HT cap is found.

Er .. duh. Memo, don't send code just before leaving for the weekend :)

Putting that back in is going to break pci_find_ht_capability(), so I'll
have to rethink it.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20061113/b050df8c/attachment.sig>


More information about the general mailing list