On Wednesday, July 02, 2008 11:29 am Matthew Wilcox wrote: > On Wed, Jul 02, 2008 at 10:59:04AM -0700, Benjamin Li wrote: > > For Broadcom 5706, 5708, 5709 rev. A nics, any read beyond the > > VPD end tag will hang the device. This problem was initially > > observed when a vpd entry was created in sysfs > > ('/sys/bus/pci/devices/<id>/vpd'). A read to this sysfs entry > > will dump 32k of data. Reading a full 32k will cause an access > > beyond the VPD end tag causing the device to hang. Once the device > > is hung, the bnx2 driver will not be able to reset the device. > > We believe that it is legal to read beyond the end tag and > > therefore the solution is to limit the read/write length. > > > > A majority of this patch is from Matthew Wilcox who gave code for > > reworking the PCI vpd size information. A PCI quirk added for the > > Broadcom NIC's to limit the read/write's. > > Could we split this into two patches? I believe everything outside > quirks.c is mine (and stands alone), and the part in quirks.c is > Benjamin's work. > > I think good commit messages would be something along the lines of: > > PCI VPD: Allow size to be changed > > It is useful to be able to set the exact size of the implemented > VPD. Allow the size to be changed by making it part of the base VPD > struct. Set it to 32k by default. > > Signed-off-by: Matthew Wilcox <willy@xxxxxxxxxxxxxxx> > Tested-by: Benjamin Li <benli@xxxxxxxxxxxx> > > PCI: Add VPD quirk for Broadcom 570x cards > > For Broadcom 5706, 5708, 5709 rev. A nics, any read beyond the > VPD end tag will hang the device. Limit the amount of VPD that can be > read to 128 bytes for these cards. > > Signed-off-by: Benjamin Li <benli@xxxxxxxxxxxx> > Reviewed-by: Matthew Wilcox <willy@xxxxxxxxxxxxxxx> Shoot, yeah splitting this up would have been better, but in my rush to get this fix pushed to Linus I already committed and updated my pull request. Sorry. Thanks, Jesse -- 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