Re: [PATCH] x86, pci: Fix all early PCI scans to check the vendorID first

From: H. Peter Anvin
Date: Mon Aug 13 2012 - 18:02:07 EST


On 08/13/2012 02:58 PM, Betty Dall wrote:
>
> I checked the PCI specification, and Peter is right that function
> numbers can be sparse. Please go with version 1 of the patch, as Andi
> suggested. I will follow up by looking at why the three scans are not
> consistent and send a patch, if appropriate. The scans could be improved
> by stopping the function scan if function 0 does not exist because
> function 0 is required, and if it is not there then none of the other
> functions will be implemented.
>

Yes, if function 0 doesn't exist we could, and *should* skip functions
1-7; in fact, we should not process functions 1-7 unless the
multifunction bit is set in function 0. This matters on real devices in
the field.

-hpa

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/