From owner-cvs-all@FreeBSD.ORG Fri Sep 29 13:12:40 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 221BA16A40F; Fri, 29 Sep 2006 13:12:40 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2F64943D53; Fri, 29 Sep 2006 13:12:39 +0000 (GMT) (envelope-from andre@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k8TDCd78077351; Fri, 29 Sep 2006 13:12:39 GMT (envelope-from andre@repoman.freebsd.org) Received: (from andre@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k8TDCdsM077350; Fri, 29 Sep 2006 13:12:39 GMT (envelope-from andre) Message-Id: <200609291312.k8TDCdsM077350@repoman.freebsd.org> From: Andre Oppermann Date: Fri, 29 Sep 2006 13:12:38 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/dev/em if_em.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Sep 2006 13:12:40 -0000 andre 2006-09-29 13:12:38 UTC FreeBSD src repository Modified files: sys/dev/em if_em.c Log: Handle all error cases from bus_dmamap_load_mbuf_sg(). Those are: - EFBIG means the mbuf chain was too long and bus_dma ran out of segments. Defragment the mbuf chain and try again. (Already existed, not changed.) - ENOMEM means bus_dma could not obtain enough bounce buffers at this point in time. Defer sending and try again later. - All other errors, in particular EINVAL, are fatal and prevent the mbuf chain from ever going through. Drop it and report error. - Checking (nsegs == 0) is unnecessary as bus_dmamap_load_mbuf_sg() always reports an error if it is < 1. This prevents broken packets from clogging the interface queue indefinately. Discussed with: scottl Reviewed by: jfv Revision Changes Path 1.148 +21 -5 src/sys/dev/em/if_em.c