total_len = rfa->actual_size &
total_len = *(u_int16_t *)(rfap + offsetof(struct fxp_rfa, actual_size)) &
fxp_intr(arg)	void *arg;{	struct fxp_softc *sc = arg;	struct ifnet *ifp = &sc->sc_if;	u_int8_t statack;#if defined(__NetBSD__) || defined(__OpenBSD__)	int claimed = 0;#endif	while ((statack = CSR_READ_1(sc, FXP_CSR_SCB_STATACK)) != 0) {#if defined(__NetBSD__) || defined(__OpenBSD__)		claimed = 1;#endif		/*		 * First ACK all the interrupts in this pass.		 */		CSR_WRITE_1(sc, FXP_CSR_SCB_STATACK, statack);		/*		 * Free any finished transmit mbuf chains.		 */		if (statack & FXP_SCB_STATACK_CXTNO) {			struct fxp_cb_tx *txp;			for (txp = sc->cbl_first; sc->tx_queued &&			    (txp->cb_status & FXP_CB_STATUS_C) != 0;			    txp = txp->next) {				if (txp->mb_head != NULL) {					m_freem(txp->mb_head);					txp->mb_head = NULL;				}				sc->tx_queued--;			}			sc->cbl_first = txp;			ifp->if_timer = 0;			if (sc->tx_queued == 0) {				if (sc->need_mcsetup)					fxp_mc_setup(sc);			}			/*			 * Try to start more packets transmitting.			 */			if (ifp->if_snd.ifq_head != NULL)				fxp_start(ifp);		}		/*		 * Process receiver interrupts. If a no-resource (RNR)		 * condition exists, get whatever packets we can and		 * re-start the receiver.		 */		if (statack & (FXP_SCB_STATACK_FR | FXP_SCB_STATACK_RNR)) {			struct mbuf *m;			struct fxp_rfa *rfa;rcvloop:			m = sc->rfa_headm;			rfa = (struct fxp_rfa *)(m->m_ext.ext_buf +			    RFA_ALIGNMENT_FUDGE);			if (rfa->rfa_status & FXP_RFA_STATUS_C) {				/*				 * Remove first packet from the chain.				 */				sc->rfa_headm = m->m_next;				m->m_next = NULL;				/*				 * Add a new buffer to the receive chain.				 * If this fails, the old buffer is recycled				 * instead.				 */				if (fxp_add_rfabuf(sc, m) == 0) {					struct ether_header *eh;					u_int16_t total_len;					total_len = rfa->actual_size &					    (MCLBYTES - 1);					if (total_len <					    sizeof(struct ether_header)) {						m_freem(m);						goto rcvloop;					}					m->m_pkthdr.rcvif = ifp;					m->m_pkthdr.len = m->m_len =					    total_len -					    sizeof(struct ether_header);					eh = mtod(m, struct ether_header *);#if NBPFILTER > 0					if (ifp->if_bpf) {						bpf_tap(FXP_BPFTAP_ARG(ifp),						    mtod(m, caddr_t),						    total_len); 						/*						 * Only pass this packet up						 * if it is for us.						 */						if ((ifp->if_flags &						    IFF_PROMISC) &&						    (rfa->rfa_status &						    FXP_RFA_STATUS_IAMATCH) &&						    (eh->ether_dhost[0] & 1)						    == 0) {							m_freem(m);							goto rcvloop;						}					}#endif /* NBPFILTER > 0 */					m->m_data +=					    sizeof(struct ether_header);					ether_input(ifp, eh, m);				}				goto rcvloop;			}			if (statack & FXP_SCB_STATACK_RNR) {				fxp_scb_wait(sc);				CSR_WRITE_4(sc, FXP_CSR_SCB_GENERAL,				    vtophys(sc->rfa_headm->m_ext.ext_buf) +					RFA_ALIGNMENT_FUDGE);				CSR_WRITE_1(sc, FXP_CSR_SCB_COMMAND,				    FXP_SCB_COMMAND_RU_START);			}		}	}#if defined(__NetBSD__) || defined(__OpenBSD__)	return (claimed);#endif}