Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/dwc/if_dwcvar.h
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | |||||
#define __IF_DWCVAR_H__ | #define __IF_DWCVAR_H__ | ||||
/* | /* | ||||
* Driver data and defines. | * Driver data and defines. | ||||
*/ | */ | ||||
#define RX_DESC_COUNT 1024 | #define RX_DESC_COUNT 1024 | ||||
#define RX_DESC_SIZE (sizeof(struct dwc_hwdesc) * RX_DESC_COUNT) | #define RX_DESC_SIZE (sizeof(struct dwc_hwdesc) * RX_DESC_COUNT) | ||||
#define TX_DESC_COUNT 1024 | #define TX_DESC_COUNT 1024 | ||||
#define TX_MAP_COUNT TX_DESC_COUNT | |||||
#define TX_DESC_SIZE (sizeof(struct dwc_hwdesc) * TX_DESC_COUNT) | #define TX_DESC_SIZE (sizeof(struct dwc_hwdesc) * TX_DESC_COUNT) | ||||
#define TX_MAP_MAX_SEGS 32 | |||||
struct dwc_bufmap { | struct dwc_bufmap { | ||||
bus_dmamap_t map; | bus_dmamap_t map; | ||||
struct mbuf *mbuf; | struct mbuf *mbuf; | ||||
/* Only used for TX descirptors */ | |||||
int last_desc_idx; | |||||
}; | }; | ||||
struct dwc_softc { | struct dwc_softc { | ||||
struct resource *res[2]; | struct resource *res[2]; | ||||
device_t dev; | device_t dev; | ||||
int mactype; | int mactype; | ||||
int mii_clk; | int mii_clk; | ||||
device_t miibus; | device_t miibus; | ||||
Show All 21 Lines | struct dwc_softc { | ||||
/* TX */ | /* TX */ | ||||
bus_dma_tag_t txdesc_tag; | bus_dma_tag_t txdesc_tag; | ||||
bus_dmamap_t txdesc_map; | bus_dmamap_t txdesc_map; | ||||
struct dwc_hwdesc *txdesc_ring; | struct dwc_hwdesc *txdesc_ring; | ||||
bus_addr_t txdesc_ring_paddr; | bus_addr_t txdesc_ring_paddr; | ||||
bus_dma_tag_t txbuf_tag; | bus_dma_tag_t txbuf_tag; | ||||
struct dwc_bufmap txbuf_map[TX_DESC_COUNT]; | struct dwc_bufmap txbuf_map[TX_DESC_COUNT]; | ||||
uint32_t tx_idx_head; | uint32_t tx_desc_head; | ||||
uint32_t tx_idx_tail; | uint32_t tx_desc_tail; | ||||
int txcount; | uint32_t tx_map_head; | ||||
uint32_t tx_map_tail; | |||||
int tx_desccount; | |||||
int tx_mapcount; | |||||
}; | }; | ||||
#endif /* __IF_DWCVAR_H__ */ | #endif /* __IF_DWCVAR_H__ */ |