diff options
author | Matt Carlson <mcarlson@broadcom.com> | 2011-08-31 07:44:54 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-09-15 15:56:40 -0400 |
commit | 93a700a9d20b05b3c3c85efc53ac840499c2e103 (patch) | |
tree | b14e18f18e049de7947f55dc952d5bfa1708b47f /drivers/net/ethernet/broadcom | |
parent | 997b4f135b8dffea812eda0311c142873804a785 (diff) |
tg3: Code movement
This patch just moves some code around for better organization.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom')
-rw-r--r-- | drivers/net/ethernet/broadcom/tg3.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index 5af560966c70..1485013b4b8c 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c | |||
@@ -3819,6 +3819,7 @@ static int tg3_copper_is_advertising_all(struct tg3 *tp, u32 mask) | |||
3819 | if (tg3_ctrl != all_mask) | 3819 | if (tg3_ctrl != all_mask) |
3820 | return 0; | 3820 | return 0; |
3821 | } | 3821 | } |
3822 | |||
3822 | return 1; | 3823 | return 1; |
3823 | } | 3824 | } |
3824 | 3825 | ||
@@ -4119,8 +4120,8 @@ relink: | |||
4119 | newlnkctl = oldlnkctl | PCI_EXP_LNKCTL_CLKREQ_EN; | 4120 | newlnkctl = oldlnkctl | PCI_EXP_LNKCTL_CLKREQ_EN; |
4120 | if (newlnkctl != oldlnkctl) | 4121 | if (newlnkctl != oldlnkctl) |
4121 | pci_write_config_word(tp->pdev, | 4122 | pci_write_config_word(tp->pdev, |
4122 | pci_pcie_cap(tp->pdev) + PCI_EXP_LNKCTL, | 4123 | pci_pcie_cap(tp->pdev) + |
4123 | newlnkctl); | 4124 | PCI_EXP_LNKCTL, newlnkctl); |
4124 | } | 4125 | } |
4125 | 4126 | ||
4126 | if (current_link_up != netif_carrier_ok(tp->dev)) { | 4127 | if (current_link_up != netif_carrier_ok(tp->dev)) { |
@@ -6733,6 +6734,10 @@ static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
6733 | } | 6734 | } |
6734 | } | 6735 | } |
6735 | 6736 | ||
6737 | if (tg3_flag(tp, USE_JUMBO_BDFLAG) && | ||
6738 | !mss && skb->len > VLAN_ETH_FRAME_LEN) | ||
6739 | base_flags |= TXD_FLAG_JMB_PKT; | ||
6740 | |||
6736 | #ifdef BCM_KERNEL_SUPPORTS_8021Q | 6741 | #ifdef BCM_KERNEL_SUPPORTS_8021Q |
6737 | if (vlan_tx_tag_present(skb)) { | 6742 | if (vlan_tx_tag_present(skb)) { |
6738 | base_flags |= TXD_FLAG_VLAN; | 6743 | base_flags |= TXD_FLAG_VLAN; |
@@ -6740,10 +6745,6 @@ static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
6740 | } | 6745 | } |
6741 | #endif | 6746 | #endif |
6742 | 6747 | ||
6743 | if (tg3_flag(tp, USE_JUMBO_BDFLAG) && | ||
6744 | !mss && skb->len > VLAN_ETH_FRAME_LEN) | ||
6745 | base_flags |= TXD_FLAG_JMB_PKT; | ||
6746 | |||
6747 | len = skb_headlen(skb); | 6748 | len = skb_headlen(skb); |
6748 | 6749 | ||
6749 | mapping = pci_map_single(tp->pdev, skb->data, len, PCI_DMA_TODEVICE); | 6750 | mapping = pci_map_single(tp->pdev, skb->data, len, PCI_DMA_TODEVICE); |
@@ -14079,7 +14080,7 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
14079 | /* BCM5785 devices are effectively PCIe devices, and should | 14080 | /* BCM5785 devices are effectively PCIe devices, and should |
14080 | * follow PCIe codepaths, but do not have a PCIe capabilities | 14081 | * follow PCIe codepaths, but do not have a PCIe capabilities |
14081 | * section. | 14082 | * section. |
14082 | */ | 14083 | */ |
14083 | tg3_flag_set(tp, PCI_EXPRESS); | 14084 | tg3_flag_set(tp, PCI_EXPRESS); |
14084 | } else if (!tg3_flag(tp, 5705_PLUS) || | 14085 | } else if (!tg3_flag(tp, 5705_PLUS) || |
14085 | tg3_flag(tp, 5780_CLASS)) { | 14086 | tg3_flag(tp, 5780_CLASS)) { |
@@ -15539,7 +15540,7 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
15539 | tnapi->tx_pending = TG3_DEF_TX_RING_PENDING; | 15540 | tnapi->tx_pending = TG3_DEF_TX_RING_PENDING; |
15540 | 15541 | ||
15541 | tnapi->int_mbox = intmbx; | 15542 | tnapi->int_mbox = intmbx; |
15542 | if (i < 4) | 15543 | if (i <= 4) |
15543 | intmbx += 0x8; | 15544 | intmbx += 0x8; |
15544 | else | 15545 | else |
15545 | intmbx += 0x4; | 15546 | intmbx += 0x4; |