Updating status word should be the last operation of UPD structure

renewal.  Disable instruction reordering by adding volatile to
xl_list_onefrag structure.
This commit is contained in:
Pyun YongHyeon 2011-05-06 22:45:13 +00:00
parent 0ecf6b16c8
commit f321edf95a
2 changed files with 3 additions and 3 deletions

View File

@ -1904,8 +1904,8 @@ xl_newbuf(struct xl_softc *sc, struct xl_chain_onefrag *c)
sc->xl_tmpmap = map;
c->xl_mbuf = m_new;
c->xl_ptr->xl_frag.xl_len = htole32(m_new->m_len | XL_LAST_FRAG);
c->xl_ptr->xl_status = 0;
c->xl_ptr->xl_frag.xl_addr = htole32(segs->ds_addr);
c->xl_ptr->xl_status = 0;
bus_dmamap_sync(sc->xl_mtag, c->xl_map, BUS_DMASYNC_PREREAD);
return (0);
}

View File

@ -468,8 +468,8 @@ struct xl_list {
struct xl_list_onefrag {
u_int32_t xl_next; /* final entry has 0 nextptr */
u_int32_t xl_status;
struct xl_frag xl_frag;
volatile u_int32_t xl_status;
volatile struct xl_frag xl_frag;
};
struct xl_list_data {