Commit 265de409 authored by Alexander Duyck's avatar Alexander Duyck Committed by David S. Miller

igb: fix two minor items found during code review

This patch addresses two minor items I found while cleaning up the igb
driver for our sourceforge version.

The first clears the context index if we don't flag that we need it.

The second item is that eims_other should be used instead of bit defines
when setting all of the EICS bits prior to reset.
Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 04fe6358
...@@ -2771,6 +2771,8 @@ static inline bool igb_tx_csum_adv(struct igb_adapter *adapter, ...@@ -2771,6 +2771,8 @@ static inline bool igb_tx_csum_adv(struct igb_adapter *adapter,
if (adapter->flags & IGB_FLAG_NEED_CTX_IDX) if (adapter->flags & IGB_FLAG_NEED_CTX_IDX)
context_desc->mss_l4len_idx = context_desc->mss_l4len_idx =
cpu_to_le32(tx_ring->queue_index << 4); cpu_to_le32(tx_ring->queue_index << 4);
else
context_desc->mss_l4len_idx = 0;
buffer_info->time_stamp = jiffies; buffer_info->time_stamp = jiffies;
buffer_info->next_to_watch = i; buffer_info->next_to_watch = i;
...@@ -3040,8 +3042,8 @@ static void igb_tx_timeout(struct net_device *netdev) ...@@ -3040,8 +3042,8 @@ static void igb_tx_timeout(struct net_device *netdev)
/* Do the reset outside of interrupt context */ /* Do the reset outside of interrupt context */
adapter->tx_timeout_count++; adapter->tx_timeout_count++;
schedule_work(&adapter->reset_task); schedule_work(&adapter->reset_task);
wr32(E1000_EICS, adapter->eims_enable_mask & wr32(E1000_EICS,
~(E1000_EIMS_TCP_TIMER | E1000_EIMS_OTHER)); (adapter->eims_enable_mask & ~adapter->eims_other));
} }
static void igb_reset_task(struct work_struct *work) static void igb_reset_task(struct work_struct *work)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment