Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros
hwmtm.h File Reference
#include "mbuf.h"

Go to the source code of this file.

Data Structures

struct  s_mbuf_pool
 
struct  hwm_r
 
struct  hw_modul
 

Macros

#define DRV_BUF_FLUSH(desc, flag)
 
#define DDI_DMA_SYNC_FORCPU
 
#define DDI_DMA_SYNC_FORDEV
 
#define RX_ENABLE_PASS_SMT   21
 
#define RX_DISABLE_PASS_SMT   22
 
#define RX_ENABLE_PASS_NSA   23
 
#define RX_DISABLE_PASS_NSA   24
 
#define RX_ENABLE_PASS_DB   25
 
#define RX_DISABLE_PASS_DB   26
 
#define RX_DISABLE_PASS_ALL   27
 
#define RX_DISABLE_LLC_PROMISC   28
 
#define RX_ENABLE_LLC_PROMISC   29
 
#define DMA_RD   1 /* memory -> hw */
 
#define DMA_WR   2 /* hw -> memory */
 
#define SMT_BUF   0x80
 
#define EN_IRQ_EOF   0x02 /* get IRQ after end of frame transmission */
 
#define LOC_TX   0x04 /* send frame to the local SMT */
 
#define LAST_FRAG   0x08 /* last TxD of the frame */
 
#define FIRST_FRAG   0x10 /* first TxD of the frame */
 
#define LAN_TX   0x20 /* send frame to network if set */
 
#define RING_DOWN   0x40 /* error: unable to send, ring down */
 
#define OUT_OF_TXD   0x80 /* error: not enough TxDs available */
 
#define NULL   0
 
#define HWM_REVERSE(x)
 
#define C_INDIC   (1L<<25)
 
#define A_INDIC   (1L<<26)
 
#define RD_FS_LOCAL   0x80
 
#define DEBUG_SMTF   1
 
#define DEBUG_SMT   2
 
#define DEBUG_ECM   3
 
#define DEBUG_RMT   4
 
#define DEBUG_CFM   5
 
#define DEBUG_PCM   6
 
#define DEBUG_SBA   7
 
#define DEBUG_ESS   8
 
#define DB_HWM_RX   10
 
#define DB_HWM_TX   11
 
#define DB_HWM_GEN   12
 
#define DB_RX(a, b, c, lev)
 
#define DB_TX(a, b, c, lev)
 
#define DB_GEN(a, b, c, lev)
 
#define SK_BREAK()
 
#define HWM_GET_TX_PHYS(txd)   (u_long)AIX_REVERSE((txd)->txd_tbadr)
 
#define HWM_GET_TX_LEN(txd)   ((int)AIX_REVERSE((txd)->txd_tbctrl)& RD_LENGTH)
 
#define HWM_GET_TX_USED(smc, queue)   (int) (smc)->hw.fp.tx_q[queue].tx_used
 
#define HWM_GET_CURR_TXD(smc, queue)
 
#define HWM_GET_RX_FRAG_LEN(rxd)
 
#define HWM_GET_RX_PHYS(rxd)   (u_long)AIX_REVERSE((rxd)->rxd_rbadr)
 
#define HWM_GET_RX_USED(smc)   ((int)(smc)->hw.fp.rx_q[QUEUE_R1].rx_used)
 
#define HWM_GET_RX_FREE(smc)   ((int)(smc)->hw.fp.rx_q[QUEUE_R1].rx_free-1)
 
#define HWM_GET_CURR_RXD(smc)
 
#define HWM_RX_CHECK(smc, low_water)
 
#define HWM_EBASE   500
 
#define HWM_E0001   HWM_EBASE + 1
 
#define HWM_E0001_MSG   "HWM: Wrong size of s_rxd_os struct"
 
#define HWM_E0002   HWM_EBASE + 2
 
#define HWM_E0002_MSG   "HWM: Wrong size of s_txd_os struct"
 
#define HWM_E0003   HWM_EBASE + 3
 
#define HWM_E0003_MSG   "HWM: smt_free_mbuf() called with NULL pointer"
 
#define HWM_E0004   HWM_EBASE + 4
 
#define HWM_E0004_MSG   "HWM: Parity error rx queue 1"
 
#define HWM_E0005   HWM_EBASE + 5
 
#define HWM_E0005_MSG   "HWM: Encoding error rx queue 1"
 
#define HWM_E0006   HWM_EBASE + 6
 
#define HWM_E0006_MSG   "HWM: Encoding error async tx queue"
 
#define HWM_E0007   HWM_EBASE + 7
 
#define HWM_E0007_MSG   "HWM: Encoding error sync tx queue"
 
#define HWM_E0008   HWM_EBASE + 8
 
#define HWM_E0008_MSG   ""
 
#define HWM_E0009   HWM_EBASE + 9
 
#define HWM_E0009_MSG   "HWM: Out of RxD condition detected"
 
#define HWM_E0010   HWM_EBASE + 10
 
#define HWM_E0010_MSG   "HWM: A protocol layer has tried to send a frame with an invalid frame control"
 
#define HWM_E0011   HWM_EBASE + 11
 
#define HWM_E0011_MSG   "HWM: mac_drv_clear_tx_queue was called although the hardware wasn't stopped"
 
#define HWM_E0012   HWM_EBASE + 12
 
#define HWM_E0012_MSG   "HWM: mac_drv_clear_rx_queue was called although the hardware wasn't stopped"
 
#define HWM_E0013   HWM_EBASE + 13
 
#define HWM_E0013_MSG   "HWM: mac_drv_repair_descr was called although the hardware wasn't stopped"
 

Macro Definition Documentation

#define A_INDIC   (1L<<26)

Definition at line 87 of file hwmtm.h.

#define C_INDIC   (1L<<25)

Definition at line 86 of file hwmtm.h.

#define DB_GEN (   a,
  b,
  c,
  lev 
)

Definition at line 186 of file hwmtm.h.

#define DB_HWM_GEN   12

Definition at line 104 of file hwmtm.h.

#define DB_HWM_RX   10

Definition at line 102 of file hwmtm.h.

#define DB_HWM_TX   11

Definition at line 103 of file hwmtm.h.

#define DB_RX (   a,
  b,
  c,
  lev 
)

Definition at line 184 of file hwmtm.h.

#define DB_TX (   a,
  b,
  c,
  lev 
)

Definition at line 185 of file hwmtm.h.

#define DDI_DMA_SYNC_FORCPU

Definition at line 35 of file hwmtm.h.

#define DDI_DMA_SYNC_FORDEV

Definition at line 36 of file hwmtm.h.

#define DEBUG_CFM   5

Definition at line 97 of file hwmtm.h.

#define DEBUG_ECM   3

Definition at line 95 of file hwmtm.h.

#define DEBUG_ESS   8

Definition at line 100 of file hwmtm.h.

#define DEBUG_PCM   6

Definition at line 98 of file hwmtm.h.

#define DEBUG_RMT   4

Definition at line 96 of file hwmtm.h.

#define DEBUG_SBA   7

Definition at line 99 of file hwmtm.h.

#define DEBUG_SMT   2

Definition at line 94 of file hwmtm.h.

#define DEBUG_SMTF   1

Definition at line 93 of file hwmtm.h.

#define DMA_RD   1 /* memory -> hw */

Definition at line 54 of file hwmtm.h.

#define DMA_WR   2 /* hw -> memory */

Definition at line 57 of file hwmtm.h.

#define DRV_BUF_FLUSH (   desc,
  flag 
)

Definition at line 34 of file hwmtm.h.

#define EN_IRQ_EOF   0x02 /* get IRQ after end of frame transmission */

Definition at line 64 of file hwmtm.h.

#define FIRST_FRAG   0x10 /* first TxD of the frame */

Definition at line 67 of file hwmtm.h.

#define HWM_E0001   HWM_EBASE + 1

Definition at line 372 of file hwmtm.h.

#define HWM_E0001_MSG   "HWM: Wrong size of s_rxd_os struct"

Definition at line 373 of file hwmtm.h.

#define HWM_E0002   HWM_EBASE + 2

Definition at line 374 of file hwmtm.h.

#define HWM_E0002_MSG   "HWM: Wrong size of s_txd_os struct"

Definition at line 375 of file hwmtm.h.

#define HWM_E0003   HWM_EBASE + 3

Definition at line 376 of file hwmtm.h.

#define HWM_E0003_MSG   "HWM: smt_free_mbuf() called with NULL pointer"

Definition at line 377 of file hwmtm.h.

#define HWM_E0004   HWM_EBASE + 4

Definition at line 378 of file hwmtm.h.

#define HWM_E0004_MSG   "HWM: Parity error rx queue 1"

Definition at line 379 of file hwmtm.h.

#define HWM_E0005   HWM_EBASE + 5

Definition at line 380 of file hwmtm.h.

#define HWM_E0005_MSG   "HWM: Encoding error rx queue 1"

Definition at line 381 of file hwmtm.h.

#define HWM_E0006   HWM_EBASE + 6

Definition at line 382 of file hwmtm.h.

#define HWM_E0006_MSG   "HWM: Encoding error async tx queue"

Definition at line 383 of file hwmtm.h.

#define HWM_E0007   HWM_EBASE + 7

Definition at line 384 of file hwmtm.h.

#define HWM_E0007_MSG   "HWM: Encoding error sync tx queue"

Definition at line 385 of file hwmtm.h.

#define HWM_E0008   HWM_EBASE + 8

Definition at line 386 of file hwmtm.h.

#define HWM_E0008_MSG   ""

Definition at line 387 of file hwmtm.h.

#define HWM_E0009   HWM_EBASE + 9

Definition at line 388 of file hwmtm.h.

#define HWM_E0009_MSG   "HWM: Out of RxD condition detected"

Definition at line 389 of file hwmtm.h.

#define HWM_E0010   HWM_EBASE + 10

Definition at line 390 of file hwmtm.h.

#define HWM_E0010_MSG   "HWM: A protocol layer has tried to send a frame with an invalid frame control"

Definition at line 391 of file hwmtm.h.

#define HWM_E0011   HWM_EBASE + 11

Definition at line 392 of file hwmtm.h.

#define HWM_E0011_MSG   "HWM: mac_drv_clear_tx_queue was called although the hardware wasn't stopped"

Definition at line 393 of file hwmtm.h.

#define HWM_E0012   HWM_EBASE + 12

Definition at line 394 of file hwmtm.h.

#define HWM_E0012_MSG   "HWM: mac_drv_clear_rx_queue was called although the hardware wasn't stopped"

Definition at line 395 of file hwmtm.h.

#define HWM_E0013   HWM_EBASE + 13

Definition at line 396 of file hwmtm.h.

#define HWM_E0013_MSG   "HWM: mac_drv_repair_descr was called although the hardware wasn't stopped"

Definition at line 397 of file hwmtm.h.

#define HWM_EBASE   500

Definition at line 369 of file hwmtm.h.

#define HWM_GET_CURR_RXD (   smc)
Value:
(struct s_smt_fp_rxd volatile *)\
(smc)->hw.fp.rx_q[QUEUE_R1].rx_curr_put

Definition at line 341 of file hwmtm.h.

#define HWM_GET_CURR_TXD (   smc,
  queue 
)
Value:
(struct s_smt_fp_txd volatile *)\
(smc)->hw.fp.tx_q[queue].tx_curr_put

Definition at line 261 of file hwmtm.h.

#define HWM_GET_RX_FRAG_LEN (   rxd)
Value:
((int)AIX_REVERSE((rxd)->rxd_rbctrl)& \

Definition at line 278 of file hwmtm.h.

#define HWM_GET_RX_FREE (   smc)    ((int)(smc)->hw.fp.rx_q[QUEUE_R1].rx_free-1)

Definition at line 326 of file hwmtm.h.

#define HWM_GET_RX_PHYS (   rxd)    (u_long)AIX_REVERSE((rxd)->rxd_rbadr)

Definition at line 295 of file hwmtm.h.

#define HWM_GET_RX_USED (   smc)    ((int)(smc)->hw.fp.rx_q[QUEUE_R1].rx_used)

Definition at line 312 of file hwmtm.h.

#define HWM_GET_TX_LEN (   txd)    ((int)AIX_REVERSE((txd)->txd_tbctrl)& RD_LENGTH)

Definition at line 226 of file hwmtm.h.

#define HWM_GET_TX_PHYS (   txd)    (u_long)AIX_REVERSE((txd)->txd_tbadr)

Definition at line 210 of file hwmtm.h.

#define HWM_GET_TX_USED (   smc,
  queue 
)    (int) (smc)->hw.fp.tx_q[queue].tx_used

Definition at line 243 of file hwmtm.h.

#define HWM_REVERSE (   x)
Value:
((((x)<<24L)&0xff000000L) + \
(((x)<< 8L)&0x00ff0000L) + \
(((x)>> 8L)&0x0000ff00L) + \
(((x)>>24L)&0x000000ffL))

Definition at line 80 of file hwmtm.h.

#define HWM_RX_CHECK (   smc,
  low_water 
)
Value:
{\
if ((low_water) >= (smc)->hw.fp.rx_q[QUEUE_R1].rx_used) {\
mac_drv_fill_rxd(smc) ;\
}\
}

Definition at line 359 of file hwmtm.h.

#define LAN_TX   0x20 /* send frame to network if set */

Definition at line 68 of file hwmtm.h.

#define LAST_FRAG   0x08 /* last TxD of the frame */

Definition at line 66 of file hwmtm.h.

#define LOC_TX   0x04 /* send frame to the local SMT */

Definition at line 65 of file hwmtm.h.

#define NULL   0

Definition at line 74 of file hwmtm.h.

#define OUT_OF_TXD   0x80 /* error: not enough TxDs available */

Definition at line 70 of file hwmtm.h.

#define RD_FS_LOCAL   0x80

Definition at line 88 of file hwmtm.h.

#define RING_DOWN   0x40 /* error: unable to send, ring down */

Definition at line 69 of file hwmtm.h.

#define RX_DISABLE_LLC_PROMISC   28

Definition at line 49 of file hwmtm.h.

#define RX_DISABLE_PASS_ALL   27

Definition at line 48 of file hwmtm.h.

#define RX_DISABLE_PASS_DB   26

Definition at line 47 of file hwmtm.h.

#define RX_DISABLE_PASS_NSA   24

Definition at line 45 of file hwmtm.h.

#define RX_DISABLE_PASS_SMT   22

Definition at line 43 of file hwmtm.h.

#define RX_ENABLE_LLC_PROMISC   29

Definition at line 50 of file hwmtm.h.

#define RX_ENABLE_PASS_DB   25

Definition at line 46 of file hwmtm.h.

#define RX_ENABLE_PASS_NSA   23

Definition at line 44 of file hwmtm.h.

#define RX_ENABLE_PASS_SMT   21

Definition at line 42 of file hwmtm.h.

#define SK_BREAK ( )

Definition at line 190 of file hwmtm.h.

#define SMT_BUF   0x80

Definition at line 59 of file hwmtm.h.