diff options
Diffstat (limited to 'drivers/net/ixgbe')
-rw-r--r-- | drivers/net/ixgbe/ixgbe.h | 4 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_82598.c | 1 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_ethtool.c | 33 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 14 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_type.h | 32 |
5 files changed, 29 insertions, 55 deletions
diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h index 2c4dc8221dcd..8f1f8bab0fd9 100644 --- a/drivers/net/ixgbe/ixgbe.h +++ b/drivers/net/ixgbe/ixgbe.h | |||
@@ -233,10 +233,6 @@ struct ixgbe_q_vector { | |||
233 | #define IXGBE_TX_CTXTDESC_ADV(R, i) \ | 233 | #define IXGBE_TX_CTXTDESC_ADV(R, i) \ |
234 | (&(((struct ixgbe_adv_tx_context_desc *)((R).desc))[i])) | 234 | (&(((struct ixgbe_adv_tx_context_desc *)((R).desc))[i])) |
235 | 235 | ||
236 | #define IXGBE_GET_DESC(R, i, type) (&(((struct type *)((R).desc))[i])) | ||
237 | #define IXGBE_TX_DESC(R, i) IXGBE_GET_DESC(R, i, ixgbe_legacy_tx_desc) | ||
238 | #define IXGBE_RX_DESC(R, i) IXGBE_GET_DESC(R, i, ixgbe_legacy_rx_desc) | ||
239 | |||
240 | #define IXGBE_MAX_JUMBO_FRAME_SIZE 16128 | 236 | #define IXGBE_MAX_JUMBO_FRAME_SIZE 16128 |
241 | #ifdef IXGBE_FCOE | 237 | #ifdef IXGBE_FCOE |
242 | /* Use 3K as the baby jumbo frame size for FCoE */ | 238 | /* Use 3K as the baby jumbo frame size for FCoE */ |
diff --git a/drivers/net/ixgbe/ixgbe_82598.c b/drivers/net/ixgbe/ixgbe_82598.c index 522c03bc1dad..1c227b0777a6 100644 --- a/drivers/net/ixgbe/ixgbe_82598.c +++ b/drivers/net/ixgbe/ixgbe_82598.c | |||
@@ -334,6 +334,7 @@ static enum ixgbe_media_type ixgbe_get_media_type_82598(struct ixgbe_hw *hw) | |||
334 | media_type = ixgbe_media_type_fiber; | 334 | media_type = ixgbe_media_type_fiber; |
335 | break; | 335 | break; |
336 | case IXGBE_DEV_ID_82598AT: | 336 | case IXGBE_DEV_ID_82598AT: |
337 | case IXGBE_DEV_ID_82598AT2: | ||
337 | media_type = ixgbe_media_type_copper; | 338 | media_type = ixgbe_media_type_copper; |
338 | break; | 339 | break; |
339 | default: | 340 | default: |
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c index 79144e950a34..c6db9a04187d 100644 --- a/drivers/net/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ixgbe/ixgbe_ethtool.c | |||
@@ -1440,7 +1440,7 @@ static int ixgbe_setup_desc_rings(struct ixgbe_adapter *adapter) | |||
1440 | goto err_nomem; | 1440 | goto err_nomem; |
1441 | } | 1441 | } |
1442 | 1442 | ||
1443 | tx_ring->size = tx_ring->count * sizeof(struct ixgbe_legacy_tx_desc); | 1443 | tx_ring->size = tx_ring->count * sizeof(union ixgbe_adv_tx_desc); |
1444 | tx_ring->size = ALIGN(tx_ring->size, 4096); | 1444 | tx_ring->size = ALIGN(tx_ring->size, 4096); |
1445 | if (!(tx_ring->desc = pci_alloc_consistent(pdev, tx_ring->size, | 1445 | if (!(tx_ring->desc = pci_alloc_consistent(pdev, tx_ring->size, |
1446 | &tx_ring->dma))) { | 1446 | &tx_ring->dma))) { |
@@ -1454,7 +1454,7 @@ static int ixgbe_setup_desc_rings(struct ixgbe_adapter *adapter) | |||
1454 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_TDBAH(0), | 1454 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_TDBAH(0), |
1455 | ((u64) tx_ring->dma >> 32)); | 1455 | ((u64) tx_ring->dma >> 32)); |
1456 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_TDLEN(0), | 1456 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_TDLEN(0), |
1457 | tx_ring->count * sizeof(struct ixgbe_legacy_tx_desc)); | 1457 | tx_ring->count * sizeof(union ixgbe_adv_tx_desc)); |
1458 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_TDH(0), 0); | 1458 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_TDH(0), 0); |
1459 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_TDT(0), 0); | 1459 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_TDT(0), 0); |
1460 | 1460 | ||
@@ -1472,7 +1472,7 @@ static int ixgbe_setup_desc_rings(struct ixgbe_adapter *adapter) | |||
1472 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_TXDCTL(0), reg_data); | 1472 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_TXDCTL(0), reg_data); |
1473 | 1473 | ||
1474 | for (i = 0; i < tx_ring->count; i++) { | 1474 | for (i = 0; i < tx_ring->count; i++) { |
1475 | struct ixgbe_legacy_tx_desc *desc = IXGBE_TX_DESC(*tx_ring, i); | 1475 | union ixgbe_adv_tx_desc *desc = IXGBE_TX_DESC_ADV(*tx_ring, i); |
1476 | struct sk_buff *skb; | 1476 | struct sk_buff *skb; |
1477 | unsigned int size = 1024; | 1477 | unsigned int size = 1024; |
1478 | 1478 | ||
@@ -1486,13 +1486,18 @@ static int ixgbe_setup_desc_rings(struct ixgbe_adapter *adapter) | |||
1486 | tx_ring->tx_buffer_info[i].length = skb->len; | 1486 | tx_ring->tx_buffer_info[i].length = skb->len; |
1487 | tx_ring->tx_buffer_info[i].dma = | 1487 | tx_ring->tx_buffer_info[i].dma = |
1488 | pci_map_single(pdev, skb->data, skb->len, | 1488 | pci_map_single(pdev, skb->data, skb->len, |
1489 | PCI_DMA_TODEVICE); | 1489 | PCI_DMA_TODEVICE); |
1490 | desc->buffer_addr = cpu_to_le64(tx_ring->tx_buffer_info[i].dma); | 1490 | desc->read.buffer_addr = |
1491 | desc->lower.data = cpu_to_le32(skb->len); | 1491 | cpu_to_le64(tx_ring->tx_buffer_info[i].dma); |
1492 | desc->lower.data |= cpu_to_le32(IXGBE_TXD_CMD_EOP | | 1492 | desc->read.cmd_type_len = cpu_to_le32(skb->len); |
1493 | IXGBE_TXD_CMD_IFCS | | 1493 | desc->read.cmd_type_len |= cpu_to_le32(IXGBE_TXD_CMD_EOP | |
1494 | IXGBE_TXD_CMD_RS); | 1494 | IXGBE_TXD_CMD_IFCS | |
1495 | desc->upper.data = 0; | 1495 | IXGBE_TXD_CMD_RS); |
1496 | desc->read.olinfo_status = 0; | ||
1497 | if (adapter->hw.mac.type == ixgbe_mac_82599EB) | ||
1498 | desc->read.olinfo_status |= | ||
1499 | (skb->len << IXGBE_ADVTXD_PAYLEN_SHIFT); | ||
1500 | |||
1496 | } | 1501 | } |
1497 | 1502 | ||
1498 | /* Setup Rx Descriptor ring and Rx buffers */ | 1503 | /* Setup Rx Descriptor ring and Rx buffers */ |
@@ -1508,7 +1513,7 @@ static int ixgbe_setup_desc_rings(struct ixgbe_adapter *adapter) | |||
1508 | goto err_nomem; | 1513 | goto err_nomem; |
1509 | } | 1514 | } |
1510 | 1515 | ||
1511 | rx_ring->size = rx_ring->count * sizeof(struct ixgbe_legacy_rx_desc); | 1516 | rx_ring->size = rx_ring->count * sizeof(union ixgbe_adv_rx_desc); |
1512 | rx_ring->size = ALIGN(rx_ring->size, 4096); | 1517 | rx_ring->size = ALIGN(rx_ring->size, 4096); |
1513 | if (!(rx_ring->desc = pci_alloc_consistent(pdev, rx_ring->size, | 1518 | if (!(rx_ring->desc = pci_alloc_consistent(pdev, rx_ring->size, |
1514 | &rx_ring->dma))) { | 1519 | &rx_ring->dma))) { |
@@ -1566,8 +1571,8 @@ static int ixgbe_setup_desc_rings(struct ixgbe_adapter *adapter) | |||
1566 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_RXCTRL, rctl); | 1571 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_RXCTRL, rctl); |
1567 | 1572 | ||
1568 | for (i = 0; i < rx_ring->count; i++) { | 1573 | for (i = 0; i < rx_ring->count; i++) { |
1569 | struct ixgbe_legacy_rx_desc *rx_desc = | 1574 | union ixgbe_adv_rx_desc *rx_desc = |
1570 | IXGBE_RX_DESC(*rx_ring, i); | 1575 | IXGBE_RX_DESC_ADV(*rx_ring, i); |
1571 | struct sk_buff *skb; | 1576 | struct sk_buff *skb; |
1572 | 1577 | ||
1573 | skb = alloc_skb(IXGBE_RXBUFFER_2048 + NET_IP_ALIGN, GFP_KERNEL); | 1578 | skb = alloc_skb(IXGBE_RXBUFFER_2048 + NET_IP_ALIGN, GFP_KERNEL); |
@@ -1580,7 +1585,7 @@ static int ixgbe_setup_desc_rings(struct ixgbe_adapter *adapter) | |||
1580 | rx_ring->rx_buffer_info[i].dma = | 1585 | rx_ring->rx_buffer_info[i].dma = |
1581 | pci_map_single(pdev, skb->data, IXGBE_RXBUFFER_2048, | 1586 | pci_map_single(pdev, skb->data, IXGBE_RXBUFFER_2048, |
1582 | PCI_DMA_FROMDEVICE); | 1587 | PCI_DMA_FROMDEVICE); |
1583 | rx_desc->buffer_addr = | 1588 | rx_desc->read.pkt_addr = |
1584 | cpu_to_le64(rx_ring->rx_buffer_info[i].dma); | 1589 | cpu_to_le64(rx_ring->rx_buffer_info[i].dma); |
1585 | memset(skb->data, 0x00, skb->len); | 1590 | memset(skb->data, 0x00, skb->len); |
1586 | } | 1591 | } |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index e3cb949b9aa9..71df9ed9b534 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.34-k2" | 52 | #define DRV_VERSION "2.0.37-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 | ||
@@ -75,6 +75,8 @@ static struct pci_device_id ixgbe_pci_tbl[] = { | |||
75 | board_82598 }, | 75 | board_82598 }, |
76 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598AT), | 76 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598AT), |
77 | board_82598 }, | 77 | board_82598 }, |
78 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598AT2), | ||
79 | board_82598 }, | ||
78 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598EB_CX4), | 80 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598EB_CX4), |
79 | board_82598 }, | 81 | board_82598 }, |
80 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598_CX4_DUAL_PORT), | 82 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598_CX4_DUAL_PORT), |
@@ -4634,13 +4636,13 @@ static void ixgbe_watchdog_task(struct work_struct *work) | |||
4634 | if (hw->mac.type == ixgbe_mac_82599EB) { | 4636 | if (hw->mac.type == ixgbe_mac_82599EB) { |
4635 | u32 mflcn = IXGBE_READ_REG(hw, IXGBE_MFLCN); | 4637 | u32 mflcn = IXGBE_READ_REG(hw, IXGBE_MFLCN); |
4636 | u32 fccfg = IXGBE_READ_REG(hw, IXGBE_FCCFG); | 4638 | u32 fccfg = IXGBE_READ_REG(hw, IXGBE_FCCFG); |
4637 | flow_rx = (mflcn & IXGBE_MFLCN_RFCE); | 4639 | flow_rx = !!(mflcn & IXGBE_MFLCN_RFCE); |
4638 | flow_tx = (fccfg & IXGBE_FCCFG_TFCE_802_3X); | 4640 | flow_tx = !!(fccfg & IXGBE_FCCFG_TFCE_802_3X); |
4639 | } else { | 4641 | } else { |
4640 | u32 frctl = IXGBE_READ_REG(hw, IXGBE_FCTRL); | 4642 | u32 frctl = IXGBE_READ_REG(hw, IXGBE_FCTRL); |
4641 | u32 rmcs = IXGBE_READ_REG(hw, IXGBE_RMCS); | 4643 | u32 rmcs = IXGBE_READ_REG(hw, IXGBE_RMCS); |
4642 | flow_rx = (frctl & IXGBE_FCTRL_RFCE); | 4644 | flow_rx = !!(frctl & IXGBE_FCTRL_RFCE); |
4643 | flow_tx = (rmcs & IXGBE_RMCS_TFCE_802_3X); | 4645 | flow_tx = !!(rmcs & IXGBE_RMCS_TFCE_802_3X); |
4644 | } | 4646 | } |
4645 | 4647 | ||
4646 | printk(KERN_INFO "ixgbe: %s NIC Link is Up %s, " | 4648 | printk(KERN_INFO "ixgbe: %s NIC Link is Up %s, " |
@@ -5100,7 +5102,7 @@ static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb) | |||
5100 | return smp_processor_id(); | 5102 | return smp_processor_id(); |
5101 | 5103 | ||
5102 | if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) | 5104 | if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) |
5103 | return 0; /* All traffic should default to class 0 */ | 5105 | return (skb->vlan_tci & IXGBE_TX_FLAGS_VLAN_PRIO_MASK) >> 13; |
5104 | 5106 | ||
5105 | return skb_tx_hash(dev, skb); | 5107 | return skb_tx_hash(dev, skb); |
5106 | } | 5108 | } |
diff --git a/drivers/net/ixgbe/ixgbe_type.h b/drivers/net/ixgbe/ixgbe_type.h index be90eb4575f6..f0f3406ef001 100644 --- a/drivers/net/ixgbe/ixgbe_type.h +++ b/drivers/net/ixgbe/ixgbe_type.h | |||
@@ -42,6 +42,7 @@ | |||
42 | #define IXGBE_DEV_ID_82598AF_SINGLE_PORT 0x10C7 | 42 | #define IXGBE_DEV_ID_82598AF_SINGLE_PORT 0x10C7 |
43 | #define IXGBE_DEV_ID_82598EB_SFP_LOM 0x10DB | 43 | #define IXGBE_DEV_ID_82598EB_SFP_LOM 0x10DB |
44 | #define IXGBE_DEV_ID_82598AT 0x10C8 | 44 | #define IXGBE_DEV_ID_82598AT 0x10C8 |
45 | #define IXGBE_DEV_ID_82598AT2 0x150B | ||
45 | #define IXGBE_DEV_ID_82598EB_CX4 0x10DD | 46 | #define IXGBE_DEV_ID_82598EB_CX4 0x10DD |
46 | #define IXGBE_DEV_ID_82598_CX4_DUAL_PORT 0x10EC | 47 | #define IXGBE_DEV_ID_82598_CX4_DUAL_PORT 0x10EC |
47 | #define IXGBE_DEV_ID_82598_DA_DUAL_PORT 0x10F1 | 48 | #define IXGBE_DEV_ID_82598_DA_DUAL_PORT 0x10F1 |
@@ -1901,27 +1902,6 @@ enum ixgbe_fdir_pballoc_type { | |||
1901 | #define IXGBE_FDIR_INIT_DONE_POLL 10 | 1902 | #define IXGBE_FDIR_INIT_DONE_POLL 10 |
1902 | #define IXGBE_FDIRCMD_CMD_POLL 10 | 1903 | #define IXGBE_FDIRCMD_CMD_POLL 10 |
1903 | 1904 | ||
1904 | /* Transmit Descriptor - Legacy */ | ||
1905 | struct ixgbe_legacy_tx_desc { | ||
1906 | u64 buffer_addr; /* Address of the descriptor's data buffer */ | ||
1907 | union { | ||
1908 | __le32 data; | ||
1909 | struct { | ||
1910 | __le16 length; /* Data buffer length */ | ||
1911 | u8 cso; /* Checksum offset */ | ||
1912 | u8 cmd; /* Descriptor control */ | ||
1913 | } flags; | ||
1914 | } lower; | ||
1915 | union { | ||
1916 | __le32 data; | ||
1917 | struct { | ||
1918 | u8 status; /* Descriptor status */ | ||
1919 | u8 css; /* Checksum start */ | ||
1920 | __le16 vlan; | ||
1921 | } fields; | ||
1922 | } upper; | ||
1923 | }; | ||
1924 | |||
1925 | /* Transmit Descriptor - Advanced */ | 1905 | /* Transmit Descriptor - Advanced */ |
1926 | union ixgbe_adv_tx_desc { | 1906 | union ixgbe_adv_tx_desc { |
1927 | struct { | 1907 | struct { |
@@ -1936,16 +1916,6 @@ union ixgbe_adv_tx_desc { | |||
1936 | } wb; | 1916 | } wb; |
1937 | }; | 1917 | }; |
1938 | 1918 | ||
1939 | /* Receive Descriptor - Legacy */ | ||
1940 | struct ixgbe_legacy_rx_desc { | ||
1941 | __le64 buffer_addr; /* Address of the descriptor's data buffer */ | ||
1942 | __le16 length; /* Length of data DMAed into data buffer */ | ||
1943 | __le16 csum; /* Packet checksum */ | ||
1944 | u8 status; /* Descriptor status */ | ||
1945 | u8 errors; /* Descriptor Errors */ | ||
1946 | __le16 vlan; | ||
1947 | }; | ||
1948 | |||
1949 | /* Receive Descriptor - Advanced */ | 1919 | /* Receive Descriptor - Advanced */ |
1950 | union ixgbe_adv_rx_desc { | 1920 | union ixgbe_adv_rx_desc { |
1951 | struct { | 1921 | struct { |