From owner-svn-src-all@FreeBSD.ORG Fri Feb 11 19:49:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7CD21065697; Fri, 11 Feb 2011 19:49:07 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC4918FC15; Fri, 11 Feb 2011 19:49:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1BJn7BK072029; Fri, 11 Feb 2011 19:49:07 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1BJn7dd072027; Fri, 11 Feb 2011 19:49:07 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201102111949.p1BJn7dd072027@svn.freebsd.org> From: Jack F Vogel Date: Fri, 11 Feb 2011 19:49:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218583 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Feb 2011 19:49:07 -0000 Author: jfv Date: Fri Feb 11 19:49:07 2011 New Revision: 218583 URL: http://svn.freebsd.org/changeset/base/218583 Log: Somehow the RX ring depletion fix got partially removed, replace the missing pieces. Modified: head/sys/dev/e1000/if_igb.c Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Fri Feb 11 19:03:00 2011 (r218582) +++ head/sys/dev/e1000/if_igb.c Fri Feb 11 19:49:07 2011 (r218583) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2010, Intel Corporation + Copyright (c) 2001-2011, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -99,7 +99,7 @@ int igb_display_debug_stats = 0; /********************************************************************* * Driver version: *********************************************************************/ -char igb_driver_version[] = "version - 2.1.3"; +char igb_driver_version[] = "version - 2.1.4"; /********************************************************************* @@ -1937,6 +1937,10 @@ igb_local_timer(void *arg) goto timeout; out: callout_reset(&adapter->timer, hz, igb_local_timer, adapter); +#ifndef DEVICE_POLLING + /* Fire off all queue interrupts - deadlock protection */ + E1000_WRITE_REG(&adapter->hw, E1000_EICS, adapter->que_mask); +#endif return; timeout: @@ -3616,6 +3620,7 @@ igb_refresh_mbufs(struct rx_ring *rxr, i int i, nsegs, error, cleaned; i = rxr->next_to_refresh; + rxr->needs_refresh = FALSE; cleaned = -1; /* Signify no completions */ while (i != limit) { rxbuf = &rxr->rx_buffers[i]; @@ -3624,8 +3629,10 @@ igb_refresh_mbufs(struct rx_ring *rxr, i goto no_split; if (rxbuf->m_head == NULL) { mh = m_gethdr(M_DONTWAIT, MT_DATA); - if (mh == NULL) + if (mh == NULL) { + rxr->needs_refresh = TRUE; goto update; + } } else mh = rxbuf->m_head; @@ -3651,8 +3658,10 @@ no_split: if (rxbuf->m_pack == NULL) { mp = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, adapter->rx_mbuf_sz); - if (mp == NULL) + if (mp == NULL) { + rxr->needs_refresh = TRUE; goto update; + } } else mp = rxbuf->m_pack; @@ -4303,6 +4312,10 @@ igb_rxeof(struct igb_queue *que, int cou bus_dmamap_sync(rxr->rxdma.dma_tag, rxr->rxdma.dma_map, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); + /* Try outstanding refresh first */ + if (rxr->needs_refresh == TRUE) + igb_refresh_mbufs(rxr, rxr->next_to_check); + /* Main clean loop */ for (i = rxr->next_to_check; count != 0;) { struct mbuf *sendmp, *mh, *mp;