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

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

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

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

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

kernel.org | git.kernel.org | LWN.net | Project Home | 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.

sflogo.php