On Mon, Jun 30, 2008 at 05:59:55PM -0700, Benjamin Li wrote: > What happens when the VPD information is corrupted? I have an NIC which > functions but has a badly formed VPD (When iterating through the VPD > tags, you will never reach an end tag) And because this patch will scan > through the entire VPD address space, it will generate an out-of-range > access. Would you have any suggestions on how we could correct this? You raise a good point. I think the call to pci_vpd_set_real_size() needs to be moved later after a quirk has had time to run. Then a quirk can adjust the size for that board. I think this combines the best of both patches. Each stage successively limits the range of data. First, the generic code sets the maximum to 32k (as per spec). Then the quirks can lower the size. Then the generic code gets to run again and try to determine if the actual size is smaller. If we do it this way, a device with broken VPD (and I've seen a few myself) won't bring the system down, as long as it has a quirk. -- Intel are signing my paycheques ... these opinions are still mine "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step." -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html