diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-10-02 16:37:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-10-02 16:37:18 -0400 |
commit | 90d5ffc729e92bffc0f84e2447e2e6dc280240a5 (patch) | |
tree | ee8e912a1e92ea612843af7492199e977f29ee89 /drivers/net/ixgbe/ixgbe_main.c | |
parent | 0efe5e32c8729ef44b00d9a7203e4c99a6378b27 (diff) | |
parent | 6053bbf7bbdbb2c94547f830ad07636c17d7024e (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (46 commits)
cnic: Fix NETDEV_UP event processing.
uvesafb/connector: Disallow unpliviged users to send netlink packets
pohmelfs/connector: Disallow unpliviged users to configure pohmelfs
dst/connector: Disallow unpliviged users to configure dst
dm/connector: Only process connector packages from privileged processes
connector: Removed the destruct_data callback since it is always kfree_skb()
connector/dm: Fixed a compilation warning
connector: Provide the sender's credentials to the callback
connector: Keep the skb in cn_callback_data
e1000e/igb/ixgbe: Don't report an error if devices don't support AER
net: Fix wrong sizeof
net: splice() from tcp to pipe should take into account O_NONBLOCK
net: Use sk_mark for routing lookup in more places
sky2: irqname based on pci address
skge: use unique IRQ name
IPv4 TCP fails to send window scale option when window scale is zero
net/ipv4/tcp.c: fix min() type mismatch warning
Kconfig: STRIP: Remove stale bits of STRIP help text
NET: mkiss: Fix typo
tg3: Remove prev_vlan_tag from struct tx_ring_info
...
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 52 |
1 files changed, 28 insertions, 24 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index c407bd9de0dd..28fbb9d281f9 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -49,7 +49,7 @@ char ixgbe_driver_name[] = "ixgbe"; | |||
49 | static const char ixgbe_driver_string[] = | 49 | static const char ixgbe_driver_string[] = |
50 | "Intel(R) 10 Gigabit PCI Express Network Driver"; | 50 | "Intel(R) 10 Gigabit PCI Express Network Driver"; |
51 | 51 | ||
52 | #define DRV_VERSION "2.0.37-k2" | 52 | #define DRV_VERSION "2.0.44-k2" |
53 | const char ixgbe_driver_version[] = DRV_VERSION; | 53 | const char ixgbe_driver_version[] = DRV_VERSION; |
54 | static char ixgbe_copyright[] = "Copyright (c) 1999-2009 Intel Corporation."; | 54 | static char ixgbe_copyright[] = "Copyright (c) 1999-2009 Intel Corporation."; |
55 | 55 | ||
@@ -1885,12 +1885,29 @@ static void ixgbe_configure_tx(struct ixgbe_adapter *adapter) | |||
1885 | IXGBE_WRITE_REG(hw, IXGBE_TDT(j), 0); | 1885 | IXGBE_WRITE_REG(hw, IXGBE_TDT(j), 0); |
1886 | adapter->tx_ring[i].head = IXGBE_TDH(j); | 1886 | adapter->tx_ring[i].head = IXGBE_TDH(j); |
1887 | adapter->tx_ring[i].tail = IXGBE_TDT(j); | 1887 | adapter->tx_ring[i].tail = IXGBE_TDT(j); |
1888 | /* Disable Tx Head Writeback RO bit, since this hoses | 1888 | /* |
1889 | * Disable Tx Head Writeback RO bit, since this hoses | ||
1889 | * bookkeeping if things aren't delivered in order. | 1890 | * bookkeeping if things aren't delivered in order. |
1890 | */ | 1891 | */ |
1891 | txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL(j)); | 1892 | switch (hw->mac.type) { |
1893 | case ixgbe_mac_82598EB: | ||
1894 | txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL(j)); | ||
1895 | break; | ||
1896 | case ixgbe_mac_82599EB: | ||
1897 | default: | ||
1898 | txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL_82599(j)); | ||
1899 | break; | ||
1900 | } | ||
1892 | txctrl &= ~IXGBE_DCA_TXCTRL_TX_WB_RO_EN; | 1901 | txctrl &= ~IXGBE_DCA_TXCTRL_TX_WB_RO_EN; |
1893 | IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL(j), txctrl); | 1902 | switch (hw->mac.type) { |
1903 | case ixgbe_mac_82598EB: | ||
1904 | IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL(j), txctrl); | ||
1905 | break; | ||
1906 | case ixgbe_mac_82599EB: | ||
1907 | default: | ||
1908 | IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL_82599(j), txctrl); | ||
1909 | break; | ||
1910 | } | ||
1894 | } | 1911 | } |
1895 | if (hw->mac.type == ixgbe_mac_82599EB) { | 1912 | if (hw->mac.type == ixgbe_mac_82599EB) { |
1896 | /* We enable 8 traffic classes, DCB only */ | 1913 | /* We enable 8 traffic classes, DCB only */ |
@@ -4432,10 +4449,13 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter) | |||
4432 | 4449 | ||
4433 | /* 82598 hardware only has a 32 bit counter in the high register */ | 4450 | /* 82598 hardware only has a 32 bit counter in the high register */ |
4434 | if (hw->mac.type == ixgbe_mac_82599EB) { | 4451 | if (hw->mac.type == ixgbe_mac_82599EB) { |
4452 | u64 tmp; | ||
4435 | adapter->stats.gorc += IXGBE_READ_REG(hw, IXGBE_GORCL); | 4453 | adapter->stats.gorc += IXGBE_READ_REG(hw, IXGBE_GORCL); |
4436 | IXGBE_READ_REG(hw, IXGBE_GORCH); /* to clear */ | 4454 | tmp = IXGBE_READ_REG(hw, IXGBE_GORCH) & 0xF; /* 4 high bits of GORC */ |
4455 | adapter->stats.gorc += (tmp << 32); | ||
4437 | adapter->stats.gotc += IXGBE_READ_REG(hw, IXGBE_GOTCL); | 4456 | adapter->stats.gotc += IXGBE_READ_REG(hw, IXGBE_GOTCL); |
4438 | IXGBE_READ_REG(hw, IXGBE_GOTCH); /* to clear */ | 4457 | tmp = IXGBE_READ_REG(hw, IXGBE_GOTCH) & 0xF; /* 4 high bits of GOTC */ |
4458 | adapter->stats.gotc += (tmp << 32); | ||
4439 | adapter->stats.tor += IXGBE_READ_REG(hw, IXGBE_TORL); | 4459 | adapter->stats.tor += IXGBE_READ_REG(hw, IXGBE_TORL); |
4440 | IXGBE_READ_REG(hw, IXGBE_TORH); /* to clear */ | 4460 | IXGBE_READ_REG(hw, IXGBE_TORH); /* to clear */ |
4441 | adapter->stats.lxonrxc += IXGBE_READ_REG(hw, IXGBE_LXONRXCNT); | 4461 | adapter->stats.lxonrxc += IXGBE_READ_REG(hw, IXGBE_LXONRXCNT); |
@@ -5071,7 +5091,6 @@ static void ixgbe_atr(struct ixgbe_adapter *adapter, struct sk_buff *skb, | |||
5071 | /* Right now, we support IPv4 only */ | 5091 | /* Right now, we support IPv4 only */ |
5072 | struct ixgbe_atr_input atr_input; | 5092 | struct ixgbe_atr_input atr_input; |
5073 | struct tcphdr *th; | 5093 | struct tcphdr *th; |
5074 | struct udphdr *uh; | ||
5075 | struct iphdr *iph = ip_hdr(skb); | 5094 | struct iphdr *iph = ip_hdr(skb); |
5076 | struct ethhdr *eth = (struct ethhdr *)skb->data; | 5095 | struct ethhdr *eth = (struct ethhdr *)skb->data; |
5077 | u16 vlan_id, src_port, dst_port, flex_bytes; | 5096 | u16 vlan_id, src_port, dst_port, flex_bytes; |
@@ -5085,12 +5104,6 @@ static void ixgbe_atr(struct ixgbe_adapter *adapter, struct sk_buff *skb, | |||
5085 | dst_port = th->dest; | 5104 | dst_port = th->dest; |
5086 | l4type |= IXGBE_ATR_L4TYPE_TCP; | 5105 | l4type |= IXGBE_ATR_L4TYPE_TCP; |
5087 | /* l4type IPv4 type is 0, no need to assign */ | 5106 | /* l4type IPv4 type is 0, no need to assign */ |
5088 | } else if(iph->protocol == IPPROTO_UDP) { | ||
5089 | uh = udp_hdr(skb); | ||
5090 | src_port = uh->source; | ||
5091 | dst_port = uh->dest; | ||
5092 | l4type |= IXGBE_ATR_L4TYPE_UDP; | ||
5093 | /* l4type IPv4 type is 0, no need to assign */ | ||
5094 | } else { | 5107 | } else { |
5095 | /* Unsupported L4 header, just bail here */ | 5108 | /* Unsupported L4 header, just bail here */ |
5096 | return; | 5109 | return; |
@@ -5494,12 +5507,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
5494 | goto err_pci_reg; | 5507 | goto err_pci_reg; |
5495 | } | 5508 | } |
5496 | 5509 | ||
5497 | err = pci_enable_pcie_error_reporting(pdev); | 5510 | pci_enable_pcie_error_reporting(pdev); |
5498 | if (err) { | ||
5499 | dev_err(&pdev->dev, "pci_enable_pcie_error_reporting failed " | ||
5500 | "0x%x\n", err); | ||
5501 | /* non-fatal, continue */ | ||
5502 | } | ||
5503 | 5511 | ||
5504 | pci_set_master(pdev); | 5512 | pci_set_master(pdev); |
5505 | pci_save_state(pdev); | 5513 | pci_save_state(pdev); |
@@ -5808,7 +5816,6 @@ static void __devexit ixgbe_remove(struct pci_dev *pdev) | |||
5808 | { | 5816 | { |
5809 | struct net_device *netdev = pci_get_drvdata(pdev); | 5817 | struct net_device *netdev = pci_get_drvdata(pdev); |
5810 | struct ixgbe_adapter *adapter = netdev_priv(netdev); | 5818 | struct ixgbe_adapter *adapter = netdev_priv(netdev); |
5811 | int err; | ||
5812 | 5819 | ||
5813 | set_bit(__IXGBE_DOWN, &adapter->state); | 5820 | set_bit(__IXGBE_DOWN, &adapter->state); |
5814 | /* clear the module not found bit to make sure the worker won't | 5821 | /* clear the module not found bit to make sure the worker won't |
@@ -5859,10 +5866,7 @@ static void __devexit ixgbe_remove(struct pci_dev *pdev) | |||
5859 | 5866 | ||
5860 | free_netdev(netdev); | 5867 | free_netdev(netdev); |
5861 | 5868 | ||
5862 | err = pci_disable_pcie_error_reporting(pdev); | 5869 | pci_disable_pcie_error_reporting(pdev); |
5863 | if (err) | ||
5864 | dev_err(&pdev->dev, | ||
5865 | "pci_disable_pcie_error_reporting failed 0x%x\n", err); | ||
5866 | 5870 | ||
5867 | pci_disable_device(pdev); | 5871 | pci_disable_device(pdev); |
5868 | } | 5872 | } |