|
@@ -63,7 +63,7 @@ char ixgbe_default_device_descr[] =
|
|
|
static char ixgbe_default_device_descr[] =
|
|
|
"Intel(R) 10 Gigabit Network Connection";
|
|
|
#endif
|
|
|
-#define DRV_VERSION "3.11.33-k"
|
|
|
+#define DRV_VERSION "3.13.10-k"
|
|
|
const char ixgbe_driver_version[] = DRV_VERSION;
|
|
|
static const char ixgbe_copyright[] =
|
|
|
"Copyright (c) 1999-2013 Intel Corporation.";
|
|
@@ -149,6 +149,52 @@ MODULE_DESCRIPTION("Intel(R) 10 Gigabit PCI Express Network Driver");
|
|
|
MODULE_LICENSE("GPL");
|
|
|
MODULE_VERSION(DRV_VERSION);
|
|
|
|
|
|
+static int ixgbe_read_pci_cfg_word_parent(struct ixgbe_adapter *adapter,
|
|
|
+ u32 reg, u16 *value)
|
|
|
+{
|
|
|
+ int pos = 0;
|
|
|
+ struct pci_dev *parent_dev;
|
|
|
+ struct pci_bus *parent_bus;
|
|
|
+
|
|
|
+ parent_bus = adapter->pdev->bus->parent;
|
|
|
+ if (!parent_bus)
|
|
|
+ return -1;
|
|
|
+
|
|
|
+ parent_dev = parent_bus->self;
|
|
|
+ if (!parent_dev)
|
|
|
+ return -1;
|
|
|
+
|
|
|
+ pos = pci_find_capability(parent_dev, PCI_CAP_ID_EXP);
|
|
|
+ if (!pos)
|
|
|
+ return -1;
|
|
|
+
|
|
|
+ pci_read_config_word(parent_dev, pos + reg, value);
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+static s32 ixgbe_get_parent_bus_info(struct ixgbe_adapter *adapter)
|
|
|
+{
|
|
|
+ struct ixgbe_hw *hw = &adapter->hw;
|
|
|
+ u16 link_status = 0;
|
|
|
+ int err;
|
|
|
+
|
|
|
+ hw->bus.type = ixgbe_bus_type_pci_express;
|
|
|
+
|
|
|
+ /* Get the negotiated link width and speed from PCI config space of the
|
|
|
+ * parent, as this device is behind a switch
|
|
|
+ */
|
|
|
+ err = ixgbe_read_pci_cfg_word_parent(adapter, 18, &link_status);
|
|
|
+
|
|
|
+ /* assume caller will handle error case */
|
|
|
+ if (err)
|
|
|
+ return err;
|
|
|
+
|
|
|
+ hw->bus.width = ixgbe_convert_bus_width(link_status);
|
|
|
+ hw->bus.speed = ixgbe_convert_bus_speed(link_status);
|
|
|
+
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
static void ixgbe_service_event_schedule(struct ixgbe_adapter *adapter)
|
|
|
{
|
|
|
if (!test_bit(__IXGBE_DOWN, &adapter->state) &&
|
|
@@ -1337,7 +1383,7 @@ static unsigned int ixgbe_get_headlen(unsigned char *data,
|
|
|
return hdr.network - data;
|
|
|
|
|
|
/* record next protocol if header is present */
|
|
|
- if (!hdr.ipv4->frag_off)
|
|
|
+ if (!(hdr.ipv4->frag_off & htons(IP_OFFSET)))
|
|
|
nexthdr = hdr.ipv4->protocol;
|
|
|
} else if (protocol == __constant_htons(ETH_P_IPV6)) {
|
|
|
if ((hdr.network - data) > (max_len - sizeof(struct ipv6hdr)))
|
|
@@ -6425,9 +6471,7 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb,
|
|
|
struct ixgbe_tx_buffer *first;
|
|
|
int tso;
|
|
|
u32 tx_flags = 0;
|
|
|
-#if PAGE_SIZE > IXGBE_MAX_DATA_PER_TXD
|
|
|
unsigned short f;
|
|
|
-#endif
|
|
|
u16 count = TXD_USE_COUNT(skb_headlen(skb));
|
|
|
__be16 protocol = skb->protocol;
|
|
|
u8 hdr_len = 0;
|
|
@@ -6439,12 +6483,9 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb,
|
|
|
* + 1 desc for context descriptor,
|
|
|
* otherwise try next time
|
|
|
*/
|
|
|
-#if PAGE_SIZE > IXGBE_MAX_DATA_PER_TXD
|
|
|
for (f = 0; f < skb_shinfo(skb)->nr_frags; f++)
|
|
|
count += TXD_USE_COUNT(skb_shinfo(skb)->frags[f].size);
|
|
|
-#else
|
|
|
- count += skb_shinfo(skb)->nr_frags;
|
|
|
-#endif
|
|
|
+
|
|
|
if (ixgbe_maybe_stop_tx(tx_ring, count + 3)) {
|
|
|
tx_ring->tx_stats.tx_busy++;
|
|
|
return NETDEV_TX_BUSY;
|
|
@@ -7329,6 +7370,10 @@ static int ixgbe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|
|
if (err)
|
|
|
goto err_sw_init;
|
|
|
|
|
|
+ /* Cache if MNG FW is up so we don't have to read the REG later */
|
|
|
+ if (hw->mac.ops.mng_fw_enabled)
|
|
|
+ hw->mng_fw_enabled = hw->mac.ops.mng_fw_enabled(hw);
|
|
|
+
|
|
|
/* Make it possible the adapter to be woken up via WOL */
|
|
|
switch (adapter->hw.mac.type) {
|
|
|
case ixgbe_mac_82599EB:
|
|
@@ -7481,7 +7526,9 @@ skip_sriov:
|
|
|
/* WOL not supported for all devices */
|
|
|
adapter->wol = 0;
|
|
|
hw->eeprom.ops.read(hw, 0x2c, &adapter->eeprom_cap);
|
|
|
- if (ixgbe_wol_supported(adapter, pdev->device, pdev->subsystem_device))
|
|
|
+ hw->wol_supported = ixgbe_wol_supported(adapter, pdev->device,
|
|
|
+ pdev->subsystem_device);
|
|
|
+ if (hw->wol_supported)
|
|
|
adapter->wol = IXGBE_WUFC_MAG;
|
|
|
|
|
|
device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
|
|
@@ -7492,10 +7539,13 @@ skip_sriov:
|
|
|
|
|
|
/* pick up the PCI bus settings for reporting later */
|
|
|
hw->mac.ops.get_bus_info(hw);
|
|
|
+ if (hw->device_id == IXGBE_DEV_ID_82599_SFP_SF_QP)
|
|
|
+ ixgbe_get_parent_bus_info(adapter);
|
|
|
|
|
|
/* print bus type/speed/width info */
|
|
|
e_dev_info("(PCI Express:%s:%s) %pM\n",
|
|
|
- (hw->bus.speed == ixgbe_bus_speed_5000 ? "5.0GT/s" :
|
|
|
+ (hw->bus.speed == ixgbe_bus_speed_8000 ? "8.0GT/s" :
|
|
|
+ hw->bus.speed == ixgbe_bus_speed_5000 ? "5.0GT/s" :
|
|
|
hw->bus.speed == ixgbe_bus_speed_2500 ? "2.5GT/s" :
|
|
|
"Unknown"),
|
|
|
(hw->bus.width == ixgbe_bus_width_pcie_x8 ? "Width x8" :
|
|
@@ -7579,6 +7629,12 @@ skip_sriov:
|
|
|
ixgbe_dbg_adapter_init(adapter);
|
|
|
#endif /* CONFIG_DEBUG_FS */
|
|
|
|
|
|
+ /* Need link setup for MNG FW, else wait for IXGBE_UP */
|
|
|
+ if (hw->mng_fw_enabled && hw->mac.ops.setup_link)
|
|
|
+ hw->mac.ops.setup_link(hw,
|
|
|
+ IXGBE_LINK_SPEED_10GB_FULL | IXGBE_LINK_SPEED_1GB_FULL,
|
|
|
+ true);
|
|
|
+
|
|
|
return 0;
|
|
|
|
|
|
err_register:
|