From owner-svn-src-all@FreeBSD.ORG Wed Aug 15 06:48:35 2012 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 2AC35106566B; Wed, 15 Aug 2012 06:48:35 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE6B48FC1A; Wed, 15 Aug 2012 06:48:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7F6mYpX015343; Wed, 15 Aug 2012 06:48:34 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7F6mYYu015340; Wed, 15 Aug 2012 06:48:34 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201208150648.q7F6mYYu015340@svn.freebsd.org> From: Adrian Chadd Date: Wed, 15 Aug 2012 06:48:34 +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: r239282 - head/sys/dev/ath 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: Wed, 15 Aug 2012 06:48:35 -0000 Author: adrian Date: Wed Aug 15 06:48:34 2012 New Revision: 239282 URL: http://svn.freebsd.org/changeset/base/239282 Log: Implement a sequential descriptor ID value and stuff it in the ath_buf. This will be used by the EDMA TX code to assign descriptor IDs in order to provide some debugging. Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Wed Aug 15 06:31:32 2012 (r239281) +++ head/sys/dev/ath/if_ath.c Wed Aug 15 06:48:34 2012 (r239282) @@ -2344,6 +2344,14 @@ _ath_getbuf_locked(struct ath_softc *sc, bf->bf_comp = NULL; /* XXX again, just to be sure */ bzero(&bf->bf_state, sizeof(bf->bf_state)); + /* + * Track the descriptor ID only if doing EDMA + */ + if (sc->sc_isedma) { + bf->bf_descid = sc->sc_txbuf_descid; + sc->sc_txbuf_descid++; + } + return bf; } Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Wed Aug 15 06:31:32 2012 (r239281) +++ head/sys/dev/ath/if_athvar.h Wed Aug 15 06:48:34 2012 (r239282) @@ -191,6 +191,7 @@ struct ath_buf { int bf_nseg; HAL_STATUS bf_rxstatus; uint16_t bf_flags; /* status flags (below) */ + uint16_t bf_descid; /* 16 bit descriptor ID */ struct ath_desc *bf_desc; /* virtual addr of desc */ struct ath_desc_status bf_status; /* tx/rx status */ bus_addr_t bf_daddr; /* physical addr of desc */ @@ -576,6 +577,7 @@ struct ath_softc { u_int sc_monpass; /* frames to pass in mon.mode */ struct ath_descdma sc_txdma; /* TX descriptors */ + uint16_t sc_txbuf_descid; ath_bufhead sc_txbuf; /* transmit buffer */ int sc_txbuf_cnt; /* how many buffers avail */ struct ath_descdma sc_txdma_mgmt; /* mgmt TX descriptors */