diff options
author | Hidetoshi Shimokawa <simokawa@FreeBSD.org> | 2003-04-17 03:38:03 +0000 |
---|---|---|
committer | Hidetoshi Shimokawa <simokawa@FreeBSD.org> | 2003-04-17 03:38:03 +0000 |
commit | 77ee030b5fe6848e5c50ae2f0013bf43f6ad0c28 (patch) | |
tree | 11114a8420b3e8fd28f1d77e46ddae593b132e23 /sys/dev/firewire/iec68113.h | |
parent | f770d2d3ddaa6d10eb3806ae6d722a20dad2d72d (diff) | |
download | src-77ee030b5fe6848e5c50ae2f0013bf43f6ad0c28.tar.gz src-77ee030b5fe6848e5c50ae2f0013bf43f6ad0c28.zip |
MFp4(simokawa_firewire):
Many internal structure changes for the FireWire driver.
- Compute CRC in CROM parsing.
- Add support for configuration ROM build.
- Simplify dummy buffer handling.
- busdma conversion
- Use swi_taskqueue_giant for -current. Mark the interrupt routine as MPSAFE.
- AR buffer handling.
Don't reallocate AR buffer but just recycle it.
Don't malloc and copy per packet in fwohci_arcv().
Pass packet to fw_rcv() using iovec.
Application must prepare receiving buffer in advance.
- Change fw_bind API so that application should pre-allocate xfer structure.
- Add fw_xfer_unload() for recycling struct fw_xfer.
- Add post_busreset hook
- Remove unused 'sub' and 'act_type' in struct fw_xfer.
- Remove npacket from struct fw_bulkxfer.
- Don't call back handlers in fwochi_arcv() if the packet has
not drained in AT queue
- Make firewire works on big endian platform.
- Use native endian for packet header and remove unnecessary ntohX/htonX.
- Remove FWXFERQ_PACKET mode. We don't use it anymore.
- Remove unnecessary restriction of FWSTMAXCHUNK.
- Don't set root node for phy config packet if the root node is
not cycle master capable but set myself for root node.
We should be the root node after next bus reset.
Spotted by: Yoshihiro Tabira <tabira@scd.mei.co.jp>
- Improve self id handling
Tested on: i386, sparc64 and i386 with forced bounce buffer
Notes
Notes:
svn path=/head/; revision=113584
Diffstat (limited to 'sys/dev/firewire/iec68113.h')
-rw-r--r-- | sys/dev/firewire/iec68113.h | 53 |
1 files changed, 46 insertions, 7 deletions
diff --git a/sys/dev/firewire/iec68113.h b/sys/dev/firewire/iec68113.h index 52a427049b38..2e47aab2216a 100644 --- a/sys/dev/firewire/iec68113.h +++ b/sys/dev/firewire/iec68113.h @@ -1,5 +1,6 @@ /* - * Copyright (c) 1998-2001 Katsushi Kobayashi and Hidetoshi Shimokawa + * Copyright (c) 2003 Hidetoshi Shimokawa + * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,29 +35,55 @@ * */ struct ciphdr { +#if BYTE_ORDER == BIG_ENDIAN + u_int8_t eoh0:1, /* 0 */ + form0:1, /* 0 */ + src:6; +#else u_int8_t src:6, form0:1, /* 0 */ eoh0:1; /* 0 */ +#endif u_int8_t len; +#if BYTE_ORDER == BIG_ENDIAN + u_int8_t fn:2, + qpc:3, + sph:1, + :2; +#else u_int8_t :2, sph:1, qpc:3, fn:2; +#endif u_int8_t dbc; +#if BYTE_ORDER == BIG_ENDIAN + u_int8_t eoh1:1, /* 1 */ + form1:1, /* 0 */ + fmt:6; +#else u_int8_t fmt:6, -#define CIP_FMT_DVCR 0 -#define CIP_FMT_MPEG (1<<5) form1:1, /* 0 */ eoh1:1; /* 1 */ +#endif +#define CIP_FMT_DVCR 0 +#define CIP_FMT_MPEG (1<<5) union { struct { - u_int8_t :2, - stype:5, +#if BYTE_ORDER == BIG_ENDIAN + u_int8_t fs:1, /* 50/60 field system + NTSC/PAL */ + stype:5, + :2; +#else + u_int8_t :2, + stype:5, + fs:1; /* 50/60 field system + NTSC/PAL */ +#endif #define CIP_STYPE_SD 0 #define CIP_STYPE_SDL 1 #define CIP_STYPE_HD 2 - fs:1; /* 50/60 field system - NTSC/PAL */ u_int16_t cyc:16; /* take care of byte order! */ } __attribute__ ((packed)) dv; u_int8_t bytes[3]; @@ -64,17 +91,29 @@ struct ciphdr { }; struct dvdbc{ +#if BYTE_ORDER == BIG_ENDIAN + u_int8_t sct:3, /* Section type */ + :1, /* Reserved */ + arb:4; /* Arbitrary bit */ +#else u_int8_t arb:4, /* Arbitrary bit */ :1, /* Reserved */ sct:3; /* Section type */ +#endif #define DV_SCT_HEADER 0 #define DV_SCT_SUBCODE 1 #define DV_SCT_VAUX 2 #define DV_SCT_AUDIO 3 #define DV_SCT_VIDEO 4 +#if BYTE_ORDER == BIG_ENDIAN + u_int8_t dseq:4, /* DIF sequence number */ + fsc:1, /* ID of a DIF block in each channel */ + :3; +#else u_int8_t :3, fsc:1, /* ID of a DIF block in each channel */ dseq:4; /* DIF sequence number */ +#endif u_int8_t dbn; /* DIF block number */ u_int8_t payload[77]; #define DV_DSF_12 0x80 /* PAL: payload[0] in Header DIF */ |