From 57ff492d3e3fcfe7fcda214e2d14e5749ec52568 Mon Sep 17 00:00:00 2001 From: Bill Paul Date: Sun, 3 Jan 1999 02:05:21 +0000 Subject: [PATCH] Minor bug: in the case where allocating a fresh mbuf for the receive ring fails, we need to set the descriptor status word so that the 'OWN' bit is set again so that the chip can reuse it. Previously, this wasn't being done. --- sys/dev/vr/if_vr.c | 7 +++---- sys/pci/if_mx.c | 7 +++---- sys/pci/if_vr.c | 7 +++---- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/sys/dev/vr/if_vr.c b/sys/dev/vr/if_vr.c index 608d43b1d831..53b0bc43f81e 100644 --- a/sys/dev/vr/if_vr.c +++ b/sys/dev/vr/if_vr.c @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_vr.c,v 1.4 1998/12/14 06:32:56 dillon Exp $ + * $Id: if_vr.c,v 1.5 1998/12/24 18:03:17 wpaul Exp $ */ /* @@ -97,7 +97,7 @@ #ifndef lint static const char rcsid[] = - "$Id: if_vr.c,v 1.4 1998/12/14 06:32:56 dillon Exp $"; + "$Id: if_vr.c,v 1.5 1998/12/24 18:03:17 wpaul Exp $"; #endif /* @@ -1303,8 +1303,7 @@ static void vr_rxeof(sc) */ if (vr_newbuf(sc, cur_rx) == ENOBUFS) { ifp->if_ierrors++; - cur_rx->vr_ptr->vr_status = - VR_RXSTAT_FIRSTFRAG|VR_RXSTAT_LASTFRAG; + cur_rx->vr_ptr->vr_status = VR_RXSTAT; cur_rx->vr_ptr->vr_ctl = VR_RXCTL_CHAIN | (MCLBYTES - 1); continue; diff --git a/sys/pci/if_mx.c b/sys/pci/if_mx.c index 1747b2d40373..b1095dcf186f 100644 --- a/sys/pci/if_mx.c +++ b/sys/pci/if_mx.c @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_mx.c,v 1.5 1998/12/14 06:32:55 dillon Exp $ + * $Id: if_mx.c,v 1.6 1998/12/24 19:10:05 wpaul Exp $ */ /* @@ -94,7 +94,7 @@ #ifndef lint static const char rcsid[] = - "$Id: if_mx.c,v 1.5 1998/12/14 06:32:55 dillon Exp $"; + "$Id: if_mx.c,v 1.6 1998/12/24 19:10:05 wpaul Exp $"; #endif /* @@ -1671,8 +1671,7 @@ static void mx_rxeof(sc) */ if (mx_newbuf(sc, cur_rx) == ENOBUFS) { ifp->if_ierrors++; - cur_rx->mx_ptr->mx_status = - MX_RXSTAT_FIRSTFRAG|MX_RXSTAT_LASTFRAG; + cur_rx->mx_ptr->mx_status = MX_RXSTAT; cur_rx->mx_ptr->mx_ctl = MX_RXCTL_RLINK | (MCLBYTES - 1); continue; diff --git a/sys/pci/if_vr.c b/sys/pci/if_vr.c index 608d43b1d831..53b0bc43f81e 100644 --- a/sys/pci/if_vr.c +++ b/sys/pci/if_vr.c @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_vr.c,v 1.4 1998/12/14 06:32:56 dillon Exp $ + * $Id: if_vr.c,v 1.5 1998/12/24 18:03:17 wpaul Exp $ */ /* @@ -97,7 +97,7 @@ #ifndef lint static const char rcsid[] = - "$Id: if_vr.c,v 1.4 1998/12/14 06:32:56 dillon Exp $"; + "$Id: if_vr.c,v 1.5 1998/12/24 18:03:17 wpaul Exp $"; #endif /* @@ -1303,8 +1303,7 @@ static void vr_rxeof(sc) */ if (vr_newbuf(sc, cur_rx) == ENOBUFS) { ifp->if_ierrors++; - cur_rx->vr_ptr->vr_status = - VR_RXSTAT_FIRSTFRAG|VR_RXSTAT_LASTFRAG; + cur_rx->vr_ptr->vr_status = VR_RXSTAT; cur_rx->vr_ptr->vr_ctl = VR_RXCTL_CHAIN | (MCLBYTES - 1); continue;