~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/scc.h

Version: ~ [ linux-5.3-rc5 ] ~ [ linux-5.2.9 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.67 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.139 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.189 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.189 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.72 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* $Id: scc.h,v 1.29 1997/04/02 14:56:45 jreuter Exp jreuter $ */
  2 #ifndef _SCC_H
  3 #define _SCC_H
  4 
  5 #include <uapi/linux/scc.h>
  6 
  7 
  8 enum {TX_OFF, TX_ON};   /* command for scc_key_trx() */
  9 
 10 /* Vector masks in RR2B */
 11 
 12 #define VECTOR_MASK     0x06
 13 #define TXINT           0x00
 14 #define EXINT           0x02
 15 #define RXINT           0x04
 16 #define SPINT           0x06
 17 
 18 #ifdef CONFIG_SCC_DELAY
 19 #define Inb(port)       inb_p(port)
 20 #define Outb(port, val) outb_p(val, port)
 21 #else
 22 #define Inb(port)       inb(port)
 23 #define Outb(port, val) outb(val, port)
 24 #endif
 25 
 26 /* SCC channel control structure for KISS */
 27 
 28 struct scc_kiss {
 29         unsigned char txdelay;          /* Transmit Delay 10 ms/cnt */
 30         unsigned char persist;          /* Persistence (0-255) as a % */
 31         unsigned char slottime;         /* Delay to wait on persistence hit */
 32         unsigned char tailtime;         /* Delay after last byte written */
 33         unsigned char fulldup;          /* Full Duplex mode 0=CSMA 1=DUP 2=ALWAYS KEYED */
 34         unsigned char waittime;         /* Waittime before any transmit attempt */
 35         unsigned int  maxkeyup;         /* Maximum time to transmit (seconds) */
 36         unsigned int  mintime;          /* Minimal offtime after MAXKEYUP timeout (seconds) */
 37         unsigned int  idletime;         /* Maximum idle time in ALWAYS KEYED mode (seconds) */
 38         unsigned int  maxdefer;         /* Timer for CSMA channel busy limit */
 39         unsigned char tx_inhibit;       /* Transmit is not allowed when set */  
 40         unsigned char group;            /* Group ID for AX.25 TX interlocking */
 41         unsigned char mode;             /* 'normal' or 'hwctrl' mode (unused) */
 42         unsigned char softdcd;          /* Use DPLL instead of DCD pin for carrier detect */
 43 };
 44 
 45 
 46 /* SCC channel structure */
 47 
 48 struct scc_channel {
 49         int init;                       /* channel exists? */
 50 
 51         struct net_device *dev;         /* link to device control structure */
 52         struct net_device_stats dev_stat;/* device statistics */
 53 
 54         char brand;                     /* manufacturer of the board */
 55         long clock;                     /* used clock */
 56 
 57         io_port ctrl;                   /* I/O address of CONTROL register */
 58         io_port data;                   /* I/O address of DATA register */
 59         io_port special;                /* I/O address of special function port */
 60         int irq;                        /* Number of Interrupt */
 61 
 62         char option;
 63         char enhanced;                  /* Enhanced SCC support */
 64 
 65         unsigned char wreg[16];         /* Copy of last written value in WRx */
 66         unsigned char status;           /* Copy of R0 at last external interrupt */
 67         unsigned char dcd;              /* DCD status */
 68 
 69         struct scc_kiss kiss;           /* control structure for KISS params */
 70         struct scc_stat stat;           /* statistical information */
 71         struct scc_modem modem;         /* modem information */
 72 
 73         struct sk_buff_head tx_queue;   /* next tx buffer */
 74         struct sk_buff *rx_buff;        /* pointer to frame currently received */
 75         struct sk_buff *tx_buff;        /* pointer to frame currently transmitted */
 76 
 77         /* Timer */
 78         struct timer_list tx_t;         /* tx timer for this channel */
 79         struct timer_list tx_wdog;      /* tx watchdogs */
 80         
 81         /* Channel lock */
 82         spinlock_t      lock;           /* Channel guard lock */
 83 };
 84 
 85 #endif /* defined(_SCC_H) */
 86 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp