summaryrefslogtreecommitdiffstats
path: root/sys/dev/fxp/if_fxpreg.h
diff options
context:
space:
mode:
authormux <mux@FreeBSD.org>2003-04-02 16:47:16 +0000
committermux <mux@FreeBSD.org>2003-04-02 16:47:16 +0000
commitfc62ec015bc2fe0aa828571a9590f1b39681d839 (patch)
treee81ac4df1b7650c1b1b30750949baf24d2a056e0 /sys/dev/fxp/if_fxpreg.h
parent0878b5fe85f9bdf31eb318b05ef3dcae859db926 (diff)
downloadFreeBSD-src-fc62ec015bc2fe0aa828571a9590f1b39681d839.zip
FreeBSD-src-fc62ec015bc2fe0aa828571a9590f1b39681d839.tar.gz
Convert the fxp(4) driver to the busdma API.
This patch is rather big because I had to significantly redesign the driver to make the busdma conversion possible. Most notably, hardware and software structures were carefully splitted to get rid of all the structs overlapping evilness. Special thanks to phk and Richard Puga <puga@mauibuilt.com> for providing me with fxp(4) hardware to do this work. Thanks to marcel for testing this on ia64, and to Fred Clift <fclift@verio.net> for testing this on alpha. Tested on: i386, ia64, alpha
Diffstat (limited to 'sys/dev/fxp/if_fxpreg.h')
-rw-r--r--sys/dev/fxp/if_fxpreg.h16
1 files changed, 2 insertions, 14 deletions
diff --git a/sys/dev/fxp/if_fxpreg.h b/sys/dev/fxp/if_fxpreg.h
index a901ca5..6572860 100644
--- a/sys/dev/fxp/if_fxpreg.h
+++ b/sys/dev/fxp/if_fxpreg.h
@@ -111,13 +111,11 @@
* Command block definitions
*/
struct fxp_cb_nop {
- void *fill[2];
volatile u_int16_t cb_status;
volatile u_int16_t cb_command;
volatile u_int32_t link_addr;
};
struct fxp_cb_ias {
- void *fill[2];
volatile u_int16_t cb_status;
volatile u_int16_t cb_command;
volatile u_int32_t link_addr;
@@ -125,7 +123,6 @@ struct fxp_cb_ias {
};
/* I hate bit-fields :-( */
struct fxp_cb_config {
- void *fill[2];
volatile u_int16_t cb_status;
volatile u_int16_t cb_command;
volatile u_int32_t link_addr;
@@ -215,8 +212,6 @@ struct fxp_cb_config {
#define MAXMCADDR 80
struct fxp_cb_mcs {
- struct fxp_cb_tx *next;
- struct mbuf *mb_head;
volatile u_int16_t cb_status;
volatile u_int16_t cb_command;
volatile u_int32_t link_addr;
@@ -226,7 +221,6 @@ struct fxp_cb_mcs {
#define MAXUCODESIZE 192
struct fxp_cb_ucode {
- void *fill[2];
u_int16_t cb_status;
u_int16_t cb_command;
u_int32_t link_addr;
@@ -234,13 +228,9 @@ struct fxp_cb_ucode {
};
/*
- * Number of DMA segments in a TxCB. Note that this is carefully
- * chosen to make the total struct size an even power of two. It's
- * critical that no TxCB be split across a page boundry since
- * no attempt is made to allocate physically contiguous memory.
+ * Number of DMA segments in a TxCB.
*/
-#define FXP_TXCB_FIXED 16 /* cb_status .. tbd_number */
-#define FXP_NTXSEG ((256 - (sizeof(void *) * 2) - FXP_TXCB_FIXED) / 8)
+#define FXP_NTXSEG 32
struct fxp_tbd {
volatile u_int32_t tb_addr;
@@ -268,8 +258,6 @@ struct fxp_ipcb {
};
struct fxp_cb_tx {
- struct fxp_cb_tx *next;
- struct mbuf *mb_head;
volatile u_int16_t cb_status;
volatile u_int16_t cb_command;
volatile u_int32_t link_addr;
OpenPOWER on IntegriCloud