29 #include <linux/netdevice.h> 30 #include <rtnet_port.h> 35 #define ETHER1394_REGION_ADDR_LEN 4096 36 #define ETHER1394_REGION_ADDR 0xfffff0200000ULL 37 #define ETHER1394_REGION_ADDR_END (ETHER1394_REGION_ADDR + ETHER1394_REGION_ADDR_LEN) 40 #define ETHER1394_GASP_SPECIFIER_ID 0x00005E 41 #define ETHER1394_GASP_SPECIFIER_ID_HI ((ETHER1394_GASP_SPECIFIER_ID >> 8) & 0xffff) 42 #define ETHER1394_GASP_SPECIFIER_ID_LO (ETHER1394_GASP_SPECIFIER_ID & 0xff) 43 #define ETHER1394_GASP_VERSION 1 45 #define ETHER1394_GASP_OVERHEAD (2 * sizeof(quadlet_t)) 47 #define ETHER1394_GASP_BUFFERS 16 49 #define ETH1394_BC_CHANNEL 31 51 #define ALL_NODES 0x003f //stolen from ieee1394_types.h 53 #define NODE_SET (ALL_NODES + 1) 55 enum eth1394_bc_states { ETHER1394_BC_CLOSED, ETHER1394_BC_OPENED,
56 ETHER1394_BC_CHECK, ETHER1394_BC_ERROR,
58 ETHER1394_BC_STOPPED };
60 #define TX_RING_SIZE 32 61 #define RX_RING_SIZE 8 64 struct list_head list;
70 #include <asm/byteorder.h> 73 #if defined __BIG_ENDIAN_BITFIELD 74 struct eth1394_uf_hdr {
79 #elif defined __LITTLE_ENDIAN_BITFIELD 80 struct eth1394_uf_hdr {
86 #error Unknown bit field type 92 #define ETH1394_HDR_LF_UF 0 93 #define ETH1394_HDR_LF_FF 1 94 #define ETH1394_HDR_LF_LF 2 95 #define ETH1394_HDR_LF_IF 3 97 #define IP1394_HW_ADDR_LEN 2 108 unsigned char s_uniq_id[ETH_ALEN];
117 #define ETHER1394_TIMEOUT 100000 120 #if defined __BIG_ENDIAN_BITFIELD 121 struct eth1394_ff_hdr {
129 #elif defined __LITTLE_ENDIAN_BITFIELD 130 struct eth1394_ff_hdr {
139 #error Unknown bit field type 143 #if defined __BIG_ENDIAN_BITFIELD 144 struct eth1394_sf_hdr {
153 #elif defined __LITTLE_ENDIAN_BITFIELD 154 struct eth1394_sf_hdr {
164 #error Unknown bit field type 167 #if defined __BIG_ENDIAN_BITFIELD 168 struct eth1394_common_hdr {
172 #elif defined __LITTLE_ENDIAN_BITFIELD 173 struct eth1394_common_hdr {
178 #error Unknown bit field type 181 struct eth1394_hdr_words {
189 struct eth1394_common_hdr common;
190 struct eth1394_uf_hdr uf;
191 struct eth1394_ff_hdr ff;
192 struct eth1394_sf_hdr sf;
193 struct eth1394_hdr_words words;
196 typedef enum {ETH1394_GASP, ETH1394_WRREQ} eth1394_tx_type;
202 int outstanding_pkts;
203 eth1394_tx_type tx_type;
205 struct hpsb_packet *packet;
206 struct eth1394_priv *priv;
207 union eth1394_hdr hdr;
210 unsigned int priority;
214 struct eth1394_priv {
215 struct net_device_stats stats;
216 struct hpsb_host *host;
217 u16 maxpayload[NODE_SET];
218 unsigned char sspd[NODE_SET];
220 int broadcast_channel;
221 enum eth1394_bc_states bc_state;
222 struct hpsb_iso *iso;
223 struct pdg_list pdg[ALL_NODES];
227 struct rtskb *tx_skbuff[TX_RING_SIZE];
228 struct rtskb *rx_skbuff[RX_RING_SIZE];
229 struct packet_task ptask_list[20];
235 struct hpsb_host *host;
236 struct rtnet_device *dev;
ipipe_spinlock_t rtdm_lock_t
Lock variable.
Definition: driver.h:551
static int __attribute__((cold))
Test if a mutex structure contains a valid autoinitializer.
Definition: mutex.c:177