Date: Wed, 15 Aug 2012 06:48:34 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r239282 - head/sys/dev/ath Message-ID: <201208150648.q7F6mYYu015340@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208150648.q7F6mYYu015340>