FreeBSD/sys/dev/bxe/bxe.c
/* must be called under the spq lock */
must be called under the spq lock
must be called under the spq lock
static inline
void bxe_sp_prod_update(struct bxe_softc *sc)
{
    int func = SC_FUNC(sc);
    mb();
    REG_WR16(sc, (BAR_XSTRORM_INTMEM + XSTORM_SPQ_PROD_OFFSET(func)),
             sc->spq_prod_idx);
    bus_space_barrier(sc->bar[BAR0].tag, sc->bar[BAR0].handle, 0, 0,
                      BUS_SPACE_BARRIER_WRITE);
}
static inline void bxe_sp_prod_update ( struct bxe_softc * sc ) { int func = SC_FUNC ( sc ) ; mb ( ) ; REG_WR16 ( sc , ( BAR_XSTRORM_INTMEM + XSTORM_SPQ_PROD_OFFSET ( func ) ) , sc -> spq_prod_idx ) ; bus_space_barrier ( sc -> bar [ BAR0 ] . tag , sc -> bar [ BAR0 ] . handle , 0 , 0 , BUS_SPACE_BARRIER_WRITE ) ; }
must be called under the spq lock
must be called under the spq lock
/*
     * Make sure that BD data is updated before writing the producer.
     * BD data is written to the memory, the producer is read from the
     * memory, thus we need a full memory barrier to ensure the ordering.
     */