Re: [PATCH] [PATCH] PCI: Limit VPD read/write lengths for Broadcom 5706, 5708, 5709 rev.

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

 



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>

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

[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