ice: Use the software based tail when checking for hung Tx ring
[linux-2.6-microblaze.git] / drivers / net / ethernet / intel / ice / ice_main.c
index c26e6a1..1aa7e06 100644 (file)
@@ -41,12 +41,12 @@ static void ice_update_pf_stats(struct ice_pf *pf);
  * ice_get_tx_pending - returns number of Tx descriptors not processed
  * @ring: the ring of descriptors
  */
-static u32 ice_get_tx_pending(struct ice_ring *ring)
+static u16 ice_get_tx_pending(struct ice_ring *ring)
 {
-       u32 head, tail;
+       u16 head, tail;
 
        head = ring->next_to_clean;
-       tail = readl(ring->tail);
+       tail = ring->next_to_use;
 
        if (head != tail)
                return (head < tail) ?