Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
linux.c File Reference
#include <linux/types.h>
#include <linux/netdevice.h>
#include <linux/module.h>
#include <linux/hdlc.h>
#include <linux/if_arp.h>
#include <linux/init.h>
#include <asm/uaccess.h>
#include <linux/rtnetlink.h>
#include <linux/skbuff.h>
#include "pmcc4_sysdep.h"
#include "sbecom_inline_linux.h"
#include "libsbew.h"
#include "pmcc4.h"
#include "pmcc4_ioctls.h"
#include "pmcc4_private.h"
#include "sbeproc.h"
#include <linux/workqueue.h>

Go to the source code of this file.

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define STATIC   static
 
#define CHANNAME   "hdlc"
 
#define _v7_hdlc_   0
 
#define V7(x)   x
 

Functions

status_t c4_chan_work_init (mpi_t *, mch_t *)
 
void musycc_wq_chan_restart (void *)
 
status_t __init c4_init (ci_t *, u_char *, u_char *)
 
status_t __init c4_init2 (ci_t *)
 
ci_t *__init c4_new (void *)
 
int __init c4hw_attach_all (void)
 
void __init hdw_sn_get (hdw_info_t *, int)
 
int c4_frame_rw (ci_t *, struct sbecom_port_param *)
 
status_t c4_get_port (ci_t *, int)
 
int c4_loop_port (ci_t *, int, u_int8_t)
 
int c4_musycc_rw (ci_t *, struct c4_musycc_param *)
 
int c4_new_chan (ci_t *, int, int, void *)
 
status_t c4_set_port (ci_t *, int)
 
int c4_pld_rw (ci_t *, struct sbecom_port_param *)
 
void cleanup_devs (void)
 
void cleanup_ioremap (void)
 
status_t musycc_chan_down (ci_t *, int)
 
irqreturn_t musycc_intr_th_handler (void *)
 
int musycc_start_xmit (ci_t *, int, void *)
 
 module_param (cxt1e1_log_level, int, 0444)
 
 module_param (cxt1e1_max_mru, int, 0444)
 
 module_param (cxt1e1_max_mtu, int, 0444)
 
 module_param (max_txdesc_used, int, 0444)
 
 module_param (max_rxdesc_used, int, 0444)
 
voidgetuserbychan (int channum)
 
charget_hdlc_name (hdlc_device *hdlc)
 
void c4_wk_chan_restart (mch_t *ch)
 
status_t c4_wk_chan_init (mpi_t *pi, mch_t *ch)
 
status_t c4_wq_port_init (mpi_t *pi)
 
void c4_wq_port_cleanup (mpi_t *pi)
 
irqreturn_t c4_linux_interrupt (int irq, void *dev_instance)
 
STATIC int chan_open (struct net_device *ndev)
 
STATIC int chan_close (struct net_device *ndev)
 
STATIC int chan_dev_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
 
STATIC int chan_attach_noop (struct net_device *ndev, unsigned short foo_1, unsigned short foo_2)
 
STATIC struct net_device_statschan_get_stats (struct net_device *ndev)
 
STATIC int c4_linux_xmit (struct sk_buff *skb, struct net_device *ndev)
 
STATIC struct net_devicecreate_chan (struct net_device *ndev, ci_t *ci, struct sbecom_chan_param *cp)
 
STATIC status_t do_get_port (struct net_device *ndev, void *data)
 
STATIC status_t do_set_port (struct net_device *ndev, void *data)
 
STATIC status_t do_port_loop (struct net_device *ndev, void *data)
 
STATIC status_t do_framer_rw (struct net_device *ndev, void *data)
 
STATIC status_t do_pld_rw (struct net_device *ndev, void *data)
 
STATIC status_t do_musycc_rw (struct net_device *ndev, void *data)
 
STATIC status_t do_get_chan (struct net_device *ndev, void *data)
 
STATIC status_t do_set_chan (struct net_device *ndev, void *data)
 
STATIC status_t do_create_chan (struct net_device *ndev, void *data)
 
STATIC status_t do_get_chan_stats (struct net_device *ndev, void *data)
 
STATIC status_t do_set_loglevel (struct net_device *ndev, void *data)
 
STATIC status_t do_deluser (struct net_device *ndev, int lockit)
 
int do_del_chan (struct net_device *musycc_dev, void *data)
 
int c4_reset_board (void *)
 
int do_reset (struct net_device *musycc_dev, void *data)
 
int do_reset_chan_stats (struct net_device *musycc_dev, void *data)
 
STATIC status_t c4_ioctl (struct net_device *ndev, struct ifreq *ifr, int cmd)
 
struct net_device *__init c4_add_dev (hdw_info_t *hi, int brdno, unsigned long f0, unsigned long f1, int irq0, int irq1)
 
STATIC int __init c4_mod_init (void)
 
STATIC void __exit cleanup_hdlc (void)
 
STATIC void __exit c4_mod_remove (void)
 
 module_init (c4_mod_init)
 
 module_exit (c4_mod_remove)
 
 MODULE_AUTHOR ("SBE Technical Services <support@sbei.com>")
 
 MODULE_DESCRIPTION ("wanPCI-CxT1E1 Generic HDLC WAN Driver module")
 

Variables

char pmcc4_OSSI_release []
 
ci_tCI
 
struct s_hdw_info hdw_info []
 
int error_flag
 
int cxt1e1_log_level = LOG_ERROR
 
int log_level_default = LOG_ERROR
 
int cxt1e1_max_mru = MUSYCC_MRU
 
int max_mru_default = MUSYCC_MRU
 
int cxt1e1_max_mtu = MUSYCC_MTU
 
int max_mtu_default = MUSYCC_MTU
 
int max_txdesc_used = MUSYCC_TXDESC_MIN
 
int max_txdesc_default = MUSYCC_TXDESC_MIN
 
int max_rxdesc_used = MUSYCC_RXDESC_MIN
 
int max_rxdesc_default = MUSYCC_RXDESC_MIN
 

Macro Definition Documentation

#define _v7_hdlc_   0

Definition at line 98 of file linux.c.

#define CHANNAME   "hdlc"

Definition at line 61 of file linux.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 15 of file linux.c.

#define STATIC   static

Definition at line 58 of file linux.c.

#define V7 (   x)    x

Definition at line 108 of file linux.c.

Function Documentation

struct net_device* __init c4_add_dev ( hdw_info_t hi,
int  brdno,
unsigned long  f0,
unsigned long  f1,
int  irq0,
int  irq1 
)
read

Definition at line 955 of file linux.c.

status_t c4_chan_work_init ( mpi_t ,
mch_t  
)
int c4_frame_rw ( ci_t ,
struct sbecom_port_param  
)

Definition at line 759 of file pmcc4_drv.c.

status_t c4_get_port ( ci_t ,
int   
)

Definition at line 900 of file pmcc4_drv.c.

status_t __init c4_init ( ci_t ,
u_char ,
u_char  
)

Definition at line 538 of file pmcc4_drv.c.

status_t __init c4_init2 ( ci_t )

Definition at line 672 of file pmcc4_drv.c.

STATIC status_t c4_ioctl ( struct net_device ndev,
struct ifreq ifr,
int  cmd 
)

Definition at line 828 of file linux.c.

irqreturn_t c4_linux_interrupt ( int  irq,
void dev_instance 
)

Definition at line 261 of file linux.c.

STATIC int c4_linux_xmit ( struct sk_buff skb,
struct net_device ndev 
)

Definition at line 398 of file linux.c.

int c4_loop_port ( ci_t ci,
int  portnum,
u_int8_t  cmd 
)

Definition at line 700 of file pmcc4_drv.c.

STATIC int __init c4_mod_init ( void  )

Definition at line 1104 of file linux.c.

STATIC void __exit c4_mod_remove ( void  )

Definition at line 1170 of file linux.c.

int c4_musycc_rw ( ci_t ,
struct c4_musycc_param  
)

Definition at line 836 of file pmcc4_drv.c.

ci_t* __init c4_new ( void )

Definition at line 134 of file pmcc4_drv.c.

int c4_new_chan ( ci_t ,
int  ,
int  ,
void  
)

Definition at line 1020 of file pmcc4_drv.c.

int c4_pld_rw ( ci_t ,
struct sbecom_port_param  
)

Definition at line 798 of file pmcc4_drv.c.

int c4_reset_board ( void )
status_t c4_set_port ( ci_t ci,
int  portnum 
)

Definition at line 915 of file pmcc4_drv.c.

status_t c4_wk_chan_init ( mpi_t pi,
mch_t ch 
)

INIT_WORK (struct work_struct *work, void (*function)(void *), void *data);

Definition at line 206 of file linux.c.

void c4_wk_chan_restart ( mch_t ch)

queue_work (struct workqueue_struct *queue, struct work_struct *work);

Definition at line 188 of file linux.c.

void c4_wq_port_cleanup ( mpi_t pi)

Definition at line 244 of file linux.c.

status_t c4_wq_port_init ( mpi_t pi)

Definition at line 221 of file linux.c.

int __init c4hw_attach_all ( void  )

Definition at line 299 of file hwprobe.c.

STATIC int chan_attach_noop ( struct net_device ndev,
unsigned short  foo_1,
unsigned short  foo_2 
)

Definition at line 330 of file linux.c.

STATIC int chan_close ( struct net_device ndev)

Definition at line 309 of file linux.c.

STATIC int chan_dev_ioctl ( struct net_device dev,
struct ifreq ifr,
int  cmd 
)

Definition at line 323 of file linux.c.

STATIC struct net_device_stats* chan_get_stats ( struct net_device ndev)
read

Definition at line 338 of file linux.c.

STATIC int chan_open ( struct net_device ndev)

Definition at line 289 of file linux.c.

void cleanup_devs ( void  )

Definition at line 201 of file hwprobe.c.

STATIC void __exit cleanup_hdlc ( void  )

Definition at line 1146 of file linux.c.

void cleanup_ioremap ( void  )

Definition at line 175 of file hwprobe.c.

STATIC struct net_device* create_chan ( struct net_device ndev,
ci_t ci,
struct sbecom_chan_param cp 
)
read

Definition at line 420 of file linux.c.

STATIC status_t do_create_chan ( struct net_device ndev,
void data 
)

Definition at line 676 of file linux.c.

int do_del_chan ( struct net_device musycc_dev,
void data 
)

Definition at line 766 of file linux.c.

STATIC status_t do_deluser ( struct net_device ndev,
int  lockit 
)

Definition at line 735 of file linux.c.

STATIC status_t do_framer_rw ( struct net_device ndev,
void data 
)

Definition at line 575 of file linux.c.

STATIC status_t do_get_chan ( struct net_device ndev,
void data 
)

Definition at line 637 of file linux.c.

STATIC status_t do_get_chan_stats ( struct net_device ndev,
void data 
)

Definition at line 703 of file linux.c.

STATIC status_t do_get_port ( struct net_device ndev,
void data 
)

Definition at line 513 of file linux.c.

STATIC status_t do_musycc_rw ( struct net_device ndev,
void data 
)

Definition at line 617 of file linux.c.

STATIC status_t do_pld_rw ( struct net_device ndev,
void data 
)

Definition at line 596 of file linux.c.

STATIC status_t do_port_loop ( struct net_device ndev,
void data 
)

Definition at line 560 of file linux.c.

int do_reset ( struct net_device musycc_dev,
void data 
)

Definition at line 788 of file linux.c.

int do_reset_chan_stats ( struct net_device musycc_dev,
void data 
)

Definition at line 817 of file linux.c.

STATIC status_t do_set_chan ( struct net_device ndev,
void data 
)

Definition at line 655 of file linux.c.

STATIC status_t do_set_loglevel ( struct net_device ndev,
void data 
)

Definition at line 724 of file linux.c.

STATIC status_t do_set_port ( struct net_device ndev,
void data 
)

Definition at line 538 of file linux.c.

char* get_hdlc_name ( hdlc_device hdlc)

Definition at line 147 of file linux.c.

void* getuserbychan ( int  channum)

Definition at line 137 of file linux.c.

void __init hdw_sn_get ( hdw_info_t ,
int   
)

Definition at line 105 of file hwprobe.c.

MODULE_AUTHOR ( "SBE Technical Services <support@sbei.com>"  )
MODULE_DESCRIPTION ( "wanPCI-CxT1E1 Generic HDLC WAN Driver module )
module_exit ( c4_mod_remove  )
module_init ( c4_mod_init  )
module_param ( cxt1e1_log_level  ,
int  ,
0444   
)
module_param ( cxt1e1_max_mru  ,
int  ,
0444   
)
module_param ( cxt1e1_max_mtu  ,
int  ,
0444   
)
module_param ( max_txdesc_used  ,
int  ,
0444   
)
module_param ( max_rxdesc_used  ,
int  ,
0444   
)
status_t musycc_chan_down ( ci_t ,
int   
)
irqreturn_t musycc_intr_th_handler ( void )

Definition at line 1172 of file musycc.c.

int musycc_start_xmit ( ci_t ,
int  ,
void  
)

Determine total amount of data to be sent

Are there sufficient descriptors available?

flow control the line if not enough descriptors remain

Put the user data into MUSYCC data buffer(s)

Definition at line 1752 of file musycc.c.

void musycc_wq_chan_restart ( void )

check for RX restart request

check for TX restart request

Definition at line 369 of file musycc.c.

Variable Documentation

ci_t* CI

Read some reserved location w/in the COMET chip as a usable VMETRO trigger point or other trace marking event.

Definition at line 81 of file pmcc4_drv.c.

int cxt1e1_log_level = LOG_ERROR

Definition at line 112 of file linux.c.

int cxt1e1_max_mru = MUSYCC_MRU

Definition at line 116 of file linux.c.

int cxt1e1_max_mtu = MUSYCC_MTU

Definition at line 120 of file linux.c.

int error_flag

Definition at line 111 of file linux.c.

struct s_hdw_info hdw_info[]

Definition at line 49 of file hwprobe.c.

int log_level_default = LOG_ERROR

Definition at line 113 of file linux.c.

int max_mru_default = MUSYCC_MRU

Definition at line 117 of file linux.c.

int max_mtu_default = MUSYCC_MTU

Definition at line 121 of file linux.c.

int max_rxdesc_default = MUSYCC_RXDESC_MIN

Definition at line 129 of file linux.c.

int max_rxdesc_used = MUSYCC_RXDESC_MIN

Definition at line 128 of file linux.c.

int max_txdesc_default = MUSYCC_TXDESC_MIN

Definition at line 125 of file linux.c.

int max_txdesc_used = MUSYCC_TXDESC_MIN

Definition at line 124 of file linux.c.

char pmcc4_OSSI_release[]

Definition at line 27 of file ossiRelease.c.