diff options
author | Matt Carlson <mcarlson@broadcom.com> | 2010-09-30 06:34:33 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-01 03:24:43 -0400 |
commit | 37a949c54857d8b2a38dbdc75bc8666c3292cbc4 (patch) | |
tree | 47d97996013a8558c702d7b87f75337e3e40b616 /drivers/net/tg3.c | |
parent | f51a8903f14512f5ce61a74657db7f84f16b2717 (diff) |
tg3: Cleanup missing VPD partno section
This patch cleans up the default VPD partno section. New entries for
5717 asic rev devices were also added.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r-- | drivers/net/tg3.c | 71 |
1 files changed, 38 insertions, 33 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 035d0d94e2b3..3b275663bbd8 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -12532,44 +12532,49 @@ partno: | |||
12532 | 12532 | ||
12533 | out_not_found: | 12533 | out_not_found: |
12534 | kfree(vpd_data); | 12534 | kfree(vpd_data); |
12535 | if (!tp->board_part_number[0]) | 12535 | if (tp->board_part_number[0]) |
12536 | return; | 12536 | return; |
12537 | 12537 | ||
12538 | out_no_vpd: | 12538 | out_no_vpd: |
12539 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) | 12539 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717) { |
12540 | if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_5717) | ||
12541 | strcpy(tp->board_part_number, "BCM5717"); | ||
12542 | else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_5718) | ||
12543 | strcpy(tp->board_part_number, "BCM5718"); | ||
12544 | else | ||
12545 | goto nomatch; | ||
12546 | } else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57780) { | ||
12547 | if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57780) | ||
12548 | strcpy(tp->board_part_number, "BCM57780"); | ||
12549 | else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57760) | ||
12550 | strcpy(tp->board_part_number, "BCM57760"); | ||
12551 | else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57790) | ||
12552 | strcpy(tp->board_part_number, "BCM57790"); | ||
12553 | else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57788) | ||
12554 | strcpy(tp->board_part_number, "BCM57788"); | ||
12555 | else | ||
12556 | goto nomatch; | ||
12557 | } else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765) { | ||
12558 | if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57761) | ||
12559 | strcpy(tp->board_part_number, "BCM57761"); | ||
12560 | else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57765) | ||
12561 | strcpy(tp->board_part_number, "BCM57765"); | ||
12562 | else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57781) | ||
12563 | strcpy(tp->board_part_number, "BCM57781"); | ||
12564 | else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57785) | ||
12565 | strcpy(tp->board_part_number, "BCM57785"); | ||
12566 | else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57791) | ||
12567 | strcpy(tp->board_part_number, "BCM57791"); | ||
12568 | else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57795) | ||
12569 | strcpy(tp->board_part_number, "BCM57795"); | ||
12570 | else | ||
12571 | goto nomatch; | ||
12572 | } else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) { | ||
12540 | strcpy(tp->board_part_number, "BCM95906"); | 12573 | strcpy(tp->board_part_number, "BCM95906"); |
12541 | else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57780 && | 12574 | } else { |
12542 | tp->pdev->device == TG3PCI_DEVICE_TIGON3_57780) | 12575 | nomatch: |
12543 | strcpy(tp->board_part_number, "BCM57780"); | ||
12544 | else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57780 && | ||
12545 | tp->pdev->device == TG3PCI_DEVICE_TIGON3_57760) | ||
12546 | strcpy(tp->board_part_number, "BCM57760"); | ||
12547 | else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57780 && | ||
12548 | tp->pdev->device == TG3PCI_DEVICE_TIGON3_57790) | ||
12549 | strcpy(tp->board_part_number, "BCM57790"); | ||
12550 | else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57780 && | ||
12551 | tp->pdev->device == TG3PCI_DEVICE_TIGON3_57788) | ||
12552 | strcpy(tp->board_part_number, "BCM57788"); | ||
12553 | else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765 && | ||
12554 | tp->pdev->device == TG3PCI_DEVICE_TIGON3_57761) | ||
12555 | strcpy(tp->board_part_number, "BCM57761"); | ||
12556 | else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765 && | ||
12557 | tp->pdev->device == TG3PCI_DEVICE_TIGON3_57765) | ||
12558 | strcpy(tp->board_part_number, "BCM57765"); | ||
12559 | else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765 && | ||
12560 | tp->pdev->device == TG3PCI_DEVICE_TIGON3_57781) | ||
12561 | strcpy(tp->board_part_number, "BCM57781"); | ||
12562 | else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765 && | ||
12563 | tp->pdev->device == TG3PCI_DEVICE_TIGON3_57785) | ||
12564 | strcpy(tp->board_part_number, "BCM57785"); | ||
12565 | else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765 && | ||
12566 | tp->pdev->device == TG3PCI_DEVICE_TIGON3_57791) | ||
12567 | strcpy(tp->board_part_number, "BCM57791"); | ||
12568 | else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765 && | ||
12569 | tp->pdev->device == TG3PCI_DEVICE_TIGON3_57795) | ||
12570 | strcpy(tp->board_part_number, "BCM57795"); | ||
12571 | else | ||
12572 | strcpy(tp->board_part_number, "none"); | 12576 | strcpy(tp->board_part_number, "none"); |
12577 | } | ||
12573 | } | 12578 | } |
12574 | 12579 | ||
12575 | static int __devinit tg3_fw_img_is_valid(struct tg3 *tp, u32 offset) | 12580 | static int __devinit tg3_fw_img_is_valid(struct tg3 *tp, u32 offset) |