1
2 #include "lm5710.h"
3 #include "bd_chain.h"
4 #include "command.h"
5 #include "context.h"
6 #include "lm_l4fp.h"
7 #include "lm_l4sp.h"
8 #include "mm_l4if.h"
9
10
11 /* TODO: remove this temporary solution for solaris / linux compilation conflict, linux needs the
12 * first option, solaris the latter */
13 #if defined(__LINUX)
14 #define TOE_TX_INIT_ZERO {{0}}
15 #else
16 #define TOE_TX_INIT_ZERO {0}
17 #endif
18
19 #define TOE_TX_DOORBELL(pdev,cid) do{\
20 struct doorbell db = TOE_TX_INIT_ZERO;\
21 db.header.data |= (TOE_CONNECTION_TYPE << DOORBELL_HDR_T_CONN_TYPE_SHIFT);\
22 DOORBELL((pdev), (cid), *((u32_t *)&db));\
23 } while(0)
24
25 static __inline void _lm_tcp_tx_write_db(
26 lm_device_t * pdev,
27 lm_tcp_con_t * tx_con,
28 u32_t cid,
29 u32_t nbytes,
30 u16_t nbds,
31 u8_t fin)
32 {
33 volatile struct toe_tx_db_data *db_data = tx_con->db_data.tx;
|
1
2 #include "lm5710.h"
3 #include "bd_chain.h"
4 #include "command.h"
5 #include "context.h"
6 #include "lm_l4fp.h"
7 #include "lm_l4sp.h"
8 #include "mm_l4if.h"
9
10
11 /* TODO: remove this temporary solution for solaris / linux compilation conflict, linux needs the
12 * first option, solaris the latter */
13 #if defined(__LINUX) || defined(__LITTLE_ENDIAN)
14 #define TOE_TX_INIT_ZERO {{0}}
15 #else
16 #define TOE_TX_INIT_ZERO {0}
17 #endif
18
19 #define TOE_TX_DOORBELL(pdev,cid) do{\
20 struct doorbell db = TOE_TX_INIT_ZERO;\
21 db.header.data |= (TOE_CONNECTION_TYPE << DOORBELL_HDR_T_CONN_TYPE_SHIFT);\
22 DOORBELL((pdev), (cid), *((u32_t *)&db));\
23 } while(0)
24
25 static __inline void _lm_tcp_tx_write_db(
26 lm_device_t * pdev,
27 lm_tcp_con_t * tx_con,
28 u32_t cid,
29 u32_t nbytes,
30 u16_t nbds,
31 u8_t fin)
32 {
33 volatile struct toe_tx_db_data *db_data = tx_con->db_data.tx;
|