summaryrefslogtreecommitdiffstats
path: root/sys/dev/firewire/firewirereg.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/firewire/firewirereg.h')
-rw-r--r--sys/dev/firewire/firewirereg.h45
1 files changed, 37 insertions, 8 deletions
diff --git a/sys/dev/firewire/firewirereg.h b/sys/dev/firewire/firewirereg.h
index e90f0c0..0f97574 100644
--- a/sys/dev/firewire/firewirereg.h
+++ b/sys/dev/firewire/firewirereg.h
@@ -224,7 +224,8 @@ struct tlabel{
};
struct fw_bind{
- u_int32_t start_hi, start_lo, addrlen;
+ u_int64_t start;
+ u_int64_t end;
STAILQ_HEAD(, fw_xfer) xferlist;
STAILQ_ENTRY(fw_bind) fclist;
STAILQ_ENTRY(fw_bind) chlist;
@@ -240,9 +241,6 @@ struct fw_xfer{
struct firewire_comm *fc;
struct fw_xferq *q;
struct timeval tv;
- /* XXX should be removed */
- u_int32_t dst; /* XXX for if_fwe */
- u_int8_t spd;
int8_t resp;
#define FWXF_INIT 0
#define FWXF_INQ 1
@@ -259,16 +257,28 @@ struct fw_xfer{
void (*hand) __P((struct fw_xfer *));
} act;
struct {
- int len;
- caddr_t buf;
+ struct fw_pkt hdr;
+ u_int32_t *payload;
+ u_int16_t pay_len;
+ u_int8_t spd;
} send, recv;
struct mbuf *mbuf;
STAILQ_ENTRY(fw_xfer) link;
struct malloc_type *malloc;
};
+
+struct fw_rcv_buf {
+ struct firewire_comm *fc;
+ struct fw_xfer *xfer;
+ struct iovec *vec;
+ u_int nvec;
+ u_int8_t spd;
+};
+
void fw_sidrcv __P((struct firewire_comm *, u_int32_t *, u_int));
-void fw_rcv __P((struct firewire_comm *, struct iovec *, int, u_int, u_int));
+void fw_rcv __P((struct fw_rcv_buf *));
void fw_xfer_unload __P(( struct fw_xfer*));
+void fw_xfer_free_buf __P(( struct fw_xfer*));
void fw_xfer_free __P(( struct fw_xfer*));
struct fw_xfer *fw_xfer_alloc __P((struct malloc_type *));
struct fw_xfer *fw_xfer_alloc_buf __P((struct malloc_type *, int, int));
@@ -284,9 +294,10 @@ u_int16_t fw_crc16 __P((u_int32_t *, u_int32_t));
void fw_xfer_timeout __P((void *));
void fw_xfer_done __P((struct fw_xfer *));
void fw_asy_callback __P((struct fw_xfer *));
+void fw_asy_callback_free __P((struct fw_xfer *));
struct fw_device *fw_noderesolve_nodeid __P((struct firewire_comm *, int));
struct fw_device *fw_noderesolve_eui64 __P((struct firewire_comm *, struct fw_eui64 *));
-struct fw_bind *fw_bindlookup __P((struct firewire_comm *, u_int32_t, u_int32_t));
+struct fw_bind *fw_bindlookup __P((struct firewire_comm *, u_int16_t, u_int32_t));
void fw_drain_txq __P((struct firewire_comm *));
int fwdev_makedev __P((struct firewire_softc *));
int fwdev_destroydev __P((struct firewire_softc *));
@@ -303,5 +314,23 @@ extern devclass_t firewire_devclass;
#define CALLOUT_INIT(x) callout_init(x)
#endif
+#if __FreeBSD_version < 500000
+/* compatibility shim for 4.X */
+#define bio buf
+#define bio_bcount b_bcount
+#define bio_cmd b_flags
+#define bio_count b_count
+#define bio_data b_data
+#define bio_dev b_dev
+#define bio_error b_error
+#define bio_flags b_flags
+#define bio_offset b_offset
+#define bio_resid b_resid
+#define BIO_ERROR B_ERROR
+#define BIO_READ B_READ
+#define BIO_WRITE B_WRITE
+#define MIN(a,b) (((a)<(b))?(a):(b))
+#endif
+
MALLOC_DECLARE(M_FW);
MALLOC_DECLARE(M_FWXFER);
OpenPOWER on IntegriCloud