sync with OpenBSD -current
This commit is contained in:
parent
a8049e67d3
commit
ae019f102d
77 changed files with 4413 additions and 6362 deletions
|
@ -60,11 +60,9 @@ struct fb_info {
|
|||
#define FBINFO_STATE_RUNNING 0
|
||||
#define FBINFO_STATE_SUSPENDED 1
|
||||
|
||||
#define FBINFO_DEFAULT 0
|
||||
#define FBINFO_VIRTFB 1
|
||||
#define FBINFO_READS_FAST 2
|
||||
|
||||
#define FBINFO_HIDE_SMEM_START 0
|
||||
#define FBINFO_VIRTFB 0x0001
|
||||
#define FBINFO_READS_FAST 0x0002
|
||||
#define FBINFO_HIDE_SMEM_START 0x0004
|
||||
|
||||
#define FB_ROTATE_UR 0
|
||||
#define FB_ROTATE_CW 1
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: if_iavf.c,v 1.14 2024/07/09 16:04:15 jmatthew Exp $ */
|
||||
/* $OpenBSD: if_iavf.c,v 1.17 2024/07/10 09:50:28 jmatthew Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2013-2015, Intel Corporation
|
||||
|
@ -1115,7 +1115,7 @@ iavf_config_hena(struct iavf_softc *sc)
|
|||
iaq.iaq_flags = htole16(IAVF_AQ_BUF | IAVF_AQ_RD);
|
||||
iaq.iaq_opcode = htole16(IAVF_AQ_OP_SEND_TO_PF);
|
||||
iaq.iaq_vc_opcode = htole32(IAVF_VC_OP_SET_RSS_HENA);
|
||||
iaq.iaq_datalen = htole32(sizeof(*caps));
|
||||
iaq.iaq_datalen = htole16(sizeof(*caps));
|
||||
iavf_aq_dva(&iaq, IAVF_DMA_DVA(&sc->sc_scratch));
|
||||
|
||||
caps = IAVF_DMA_KVA(&sc->sc_scratch);
|
||||
|
@ -2393,11 +2393,15 @@ iavf_atq_done(struct iavf_softc *sc)
|
|||
unsigned int cons;
|
||||
unsigned int prod;
|
||||
|
||||
mtx_enter(&sc->sc_atq_mtx);
|
||||
|
||||
prod = sc->sc_atq_prod;
|
||||
cons = sc->sc_atq_cons;
|
||||
|
||||
if (prod == cons)
|
||||
if (prod == cons) {
|
||||
mtx_leave(&sc->sc_atq_mtx);
|
||||
return;
|
||||
}
|
||||
|
||||
atq = IAVF_DMA_KVA(&sc->sc_atq);
|
||||
|
||||
|
@ -2421,6 +2425,8 @@ iavf_atq_done(struct iavf_softc *sc)
|
|||
BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
|
||||
|
||||
sc->sc_atq_cons = cons;
|
||||
|
||||
mtx_leave(&sc->sc_atq_mtx);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -2429,6 +2435,8 @@ iavf_atq_post(struct iavf_softc *sc, struct iavf_aq_desc *iaq)
|
|||
struct iavf_aq_desc *atq, *slot;
|
||||
unsigned int prod;
|
||||
|
||||
mtx_enter(&sc->sc_atq_mtx);
|
||||
|
||||
atq = IAVF_DMA_KVA(&sc->sc_atq);
|
||||
prod = sc->sc_atq_prod;
|
||||
slot = atq + prod;
|
||||
|
@ -2446,6 +2454,9 @@ iavf_atq_post(struct iavf_softc *sc, struct iavf_aq_desc *iaq)
|
|||
prod &= IAVF_AQ_MASK;
|
||||
sc->sc_atq_prod = prod;
|
||||
iavf_wr(sc, sc->sc_aq_regs->atq_tail, prod);
|
||||
|
||||
mtx_leave(&sc->sc_atq_mtx);
|
||||
|
||||
return (prod);
|
||||
}
|
||||
|
||||
|
@ -2554,15 +2565,15 @@ iavf_config_irq_map(struct iavf_softc *sc)
|
|||
iavf_aq_dva(&iaq, IAVF_DMA_DVA(&sc->sc_scratch));
|
||||
|
||||
map = IAVF_DMA_KVA(&sc->sc_scratch);
|
||||
map->num_vectors = letoh16(1);
|
||||
map->num_vectors = htole16(1);
|
||||
|
||||
vec = map->vecmap;
|
||||
vec[0].vsi_id = letoh16(sc->sc_vsi_id);
|
||||
vec[0].vsi_id = htole16(sc->sc_vsi_id);
|
||||
vec[0].vector_id = 0;
|
||||
vec[0].rxq_map = letoh16(iavf_allqueues(sc));
|
||||
vec[0].txq_map = letoh16(iavf_allqueues(sc));
|
||||
vec[0].rxitr_idx = IAVF_NOITR;
|
||||
vec[0].txitr_idx = IAVF_NOITR;
|
||||
vec[0].rxq_map = htole16(iavf_allqueues(sc));
|
||||
vec[0].txq_map = htole16(iavf_allqueues(sc));
|
||||
vec[0].rxitr_idx = htole16(IAVF_NOITR);
|
||||
vec[0].txitr_idx = htole16(IAVF_NOITR);
|
||||
|
||||
bus_dmamap_sync(sc->sc_dmat, IAVF_DMA_MAP(&sc->sc_scratch), 0, IAVF_DMA_LEN(&sc->sc_scratch),
|
||||
BUS_DMASYNC_PREREAD);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue