if (sc->mx_cdata.mx_tx_head == NULL) {
if (sc->mx_cdata.mx_tx_head == NULL)
static void mx_start(ifp)	struct ifnet		*ifp;{	struct mx_softc		*sc;	struct mbuf		*m_head = NULL;	struct mx_chain		*cur_tx = NULL, *start_tx;	sc = ifp->if_softc;	if (sc->mx_autoneg) {		sc->mx_tx_pend = 1;		return;	}	/*	 * Check for an available queue slot. If there are none,	 * punt.	 */	if (sc->mx_cdata.mx_tx_free->mx_mbuf != NULL) {		ifp->if_flags |= IFF_OACTIVE;		return;	}	start_tx = sc->mx_cdata.mx_tx_free;	while(sc->mx_cdata.mx_tx_free->mx_mbuf == NULL) {		IF_DEQUEUE(&ifp->if_snd, m_head);		if (m_head == NULL)			break;		/* Pick a descriptor off the free list. */		cur_tx = sc->mx_cdata.mx_tx_free;		sc->mx_cdata.mx_tx_free = cur_tx->mx_nextdesc;		/* Pack the data into the descriptor. */		mx_encap(sc, cur_tx, m_head);		if (cur_tx != start_tx)			MX_TXOWN(cur_tx) = MX_TXSTAT_OWN;#if NBPFILTER > 0		/*		 * If there's a BPF listener, bounce a copy of this frame		 * to him.		 */		if (ifp->if_bpf)			bpf_mtap(ifp->if_bpf, cur_tx->mx_mbuf);#endif	}	/*	 * If there are no frames queued, bail.	 */	if (cur_tx == NULL)		return;	/*	 * Place the request for the upload interrupt	 * in the last descriptor in the chain. This way, if	 * we're chaining several packets at once, we'll only	 * get an interupt once for the whole chain rather than	 * once for each packet.	 */	MX_TXCTL(cur_tx) |= MX_TXCTL_FINT;	sc->mx_cdata.mx_tx_tail = cur_tx;	if (sc->mx_cdata.mx_tx_head == NULL) {		sc->mx_cdata.mx_tx_head = start_tx;		MX_TXOWN(start_tx) = MX_TXSTAT_OWN;		CSR_WRITE_4(sc, MX_TXSTART, 0xFFFFFFFF);	} else {		MX_TXOWN(start_tx) = MX_UNSENT;	}	/*	 * Set a timeout in case the chip goes out to lunch.	 */	ifp->if_timer = 5;	return;}