aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2.c
diff options
context:
space:
mode:
authorMatt Carlson <mcarlson@broadcom.com>2010-02-26 09:04:39 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-28 03:43:30 -0500
commita2ce766238f72ff7337606c0bc96803c30c9e05c (patch)
tree5968e585402263556481075a49599dc697aeab49 /drivers/net/bnx2.c
parent2ea186ae533c7b4f4c56811b69d3e40a6209a9c0 (diff)
pci: Add PCI LRDT tag size and section size
This patch adds a preprocessor constant to describe the PCI VPD large resource data type tag size and an inline function to extract the large resource section size from the large resource data type tag. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r--drivers/net/bnx2.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index d3f739a295df..bb403887b549 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -7773,15 +7773,17 @@ bnx2_read_vpd_fw_ver(struct bnx2 *bp)
7773 unsigned int block_end; 7773 unsigned int block_end;
7774 7774
7775 if (val == 0x82 || val == 0x91) { 7775 if (val == 0x82 || val == 0x91) {
7776 i = (i + 3 + (data[i + 1] + (data[i + 2] << 8))); 7776 i += PCI_VPD_LRDT_TAG_SIZE +
7777 pci_vpd_lrdt_size(&data[i]);
7777 continue; 7778 continue;
7778 } 7779 }
7779 7780
7780 if (val != 0x90) 7781 if (val != 0x90)
7781 goto vpd_done; 7782 goto vpd_done;
7782 7783
7783 block_end = (i + 3 + (data[i + 1] + (data[i + 2] << 8))); 7784 block_end = (i + PCI_VPD_LRDT_TAG_SIZE +
7784 i += 3; 7785 pci_vpd_lrdt_size(&data[i]));
7786 i += PCI_VPD_LRDT_TAG_SIZE;
7785 7787
7786 if (block_end > BNX2_VPD_LEN) 7788 if (block_end > BNX2_VPD_LEN)
7787 goto vpd_done; 7789 goto vpd_done;