Re: [PATCH] PCI: Disable VPD capability in Broadcom 5706, 5708, 5709 rev. A nics

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

 



Matthew Wilcox wrote:

> On Thu, Jun 26, 2008 at 09:09:25PM -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 disable the VPD capability and
> > not expose this data.
>
> Different scholars have differing opinions on whether it's
> legal to read
> beyond the end tag.  Regardless of the law, there's devices
> in the field
> that have this problem, so let's not throw the baby out with the
> bathwater.
>
> I think with the below patch you can now do something like this:
>
> static void __devinit quirk_brcm_570x_shorten_vpd(struct pci_dev *dev)
> {
>         dev->vpd->base.len = 8192;
> }
>

Thanks, I think this will work.  The remaining concern we have with
this approach is that people can still hang the device when they
write their own application using setpci to read the VPD beyond the
end tag.  On one device, only a PCI reset can bring it back.

--
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

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux