summaryrefslogtreecommitdiff
path: root/sys/dev/mly
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>2001-03-05 13:09:13 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>2001-03-05 13:09:13 +0000
commit250ca53067c7d9dd1e8993dbe55b6b9082aca074 (patch)
tree5c91247629fafc3b80f69b62c1da8b2cc14c30c4 /sys/dev/mly
parentdc6a64b2e84e1d8faa4eef4552a215f000cc7a1d (diff)
Notes
Diffstat (limited to 'sys/dev/mly')
-rw-r--r--sys/dev/mly/mly.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/dev/mly/mly.c b/sys/dev/mly/mly.c
index 15073f4e4a9f..91cec9c8a1ef 100644
--- a/sys/dev/mly/mly.c
+++ b/sys/dev/mly/mly.c
@@ -42,9 +42,6 @@
#include <cam/scsi/scsi_all.h>
-/* XXX: This is not where we should get fldoff() from. */
-#include <struct.h>
-
#include <dev/mly/mlyreg.h>
#include <dev/mly/mlyvar.h>
#define MLY_DEFINE_TABLES
@@ -442,9 +439,9 @@ mly_enable_mmbox(struct mly_softc *sc)
bzero(&mci, sizeof(mci));
mci.sub_ioctl = MDACIOCTL_SETMEMORYMAILBOX;
/* set buffer addresses */
- mci.param.setmemorymailbox.command_mailbox_physaddr = sc->mly_mmbox_busaddr + fldoff(mly_mmbox, mmm_command);
- mci.param.setmemorymailbox.status_mailbox_physaddr = sc->mly_mmbox_busaddr + fldoff(mly_mmbox, mmm_status);
- mci.param.setmemorymailbox.health_buffer_physaddr = sc->mly_mmbox_busaddr + fldoff(mly_mmbox, mmm_health);
+ mci.param.setmemorymailbox.command_mailbox_physaddr = sc->mly_mmbox_busaddr + offsetof(struct mly_mmbox, mmm_command);
+ mci.param.setmemorymailbox.status_mailbox_physaddr = sc->mly_mmbox_busaddr + offsetof(struct mly_mmbox, mmm_status);
+ mci.param.setmemorymailbox.health_buffer_physaddr = sc->mly_mmbox_busaddr + offsetof(struct mly_mmbox, mmm_health);
/* set buffer sizes - abuse of data_size field is revolting */
sp = (u_int8_t *)&mci.data_size;