static inline void cls_set_ixoff_flow_control(struct channel_t *ch);
static inline void cls_set_no_output_flow_control(struct channel_t *ch);
static inline void cls_set_no_input_flow_control(struct channel_t *ch);
-static void cls_parse_modem(struct channel_t *ch, uchar signals);
+static void cls_parse_modem(struct channel_t *ch, unsigned char signals);
static void cls_tasklet(unsigned long data);
static void cls_vpd(struct dgnc_board *brd);
static void cls_uart_init(struct channel_t *ch);
static inline void cls_set_cts_flow_control(struct channel_t *ch)
{
- uchar lcrb = readb(&ch->ch_cls_uart->lcr);
- uchar ier = readb(&ch->ch_cls_uart->ier);
- uchar isr_fcr = 0;
+ unsigned char lcrb = readb(&ch->ch_cls_uart->lcr);
+ unsigned char ier = readb(&ch->ch_cls_uart->ier);
+ unsigned char isr_fcr = 0;
/*
static inline void cls_set_ixon_flow_control(struct channel_t *ch)
{
- uchar lcrb = readb(&ch->ch_cls_uart->lcr);
- uchar ier = readb(&ch->ch_cls_uart->ier);
- uchar isr_fcr = 0;
+ unsigned char lcrb = readb(&ch->ch_cls_uart->lcr);
+ unsigned char ier = readb(&ch->ch_cls_uart->ier);
+ unsigned char isr_fcr = 0;
/*
static inline void cls_set_no_output_flow_control(struct channel_t *ch)
{
- uchar lcrb = readb(&ch->ch_cls_uart->lcr);
- uchar ier = readb(&ch->ch_cls_uart->ier);
- uchar isr_fcr = 0;
+ unsigned char lcrb = readb(&ch->ch_cls_uart->lcr);
+ unsigned char ier = readb(&ch->ch_cls_uart->ier);
+ unsigned char isr_fcr = 0;
/*
static inline void cls_set_rts_flow_control(struct channel_t *ch)
{
- uchar lcrb = readb(&ch->ch_cls_uart->lcr);
- uchar ier = readb(&ch->ch_cls_uart->ier);
- uchar isr_fcr = 0;
+ unsigned char lcrb = readb(&ch->ch_cls_uart->lcr);
+ unsigned char ier = readb(&ch->ch_cls_uart->ier);
+ unsigned char isr_fcr = 0;
/*
static inline void cls_set_ixoff_flow_control(struct channel_t *ch)
{
- uchar lcrb = readb(&ch->ch_cls_uart->lcr);
- uchar ier = readb(&ch->ch_cls_uart->ier);
- uchar isr_fcr = 0;
+ unsigned char lcrb = readb(&ch->ch_cls_uart->lcr);
+ unsigned char ier = readb(&ch->ch_cls_uart->ier);
+ unsigned char isr_fcr = 0;
/*
static inline void cls_set_no_input_flow_control(struct channel_t *ch)
{
- uchar lcrb = readb(&ch->ch_cls_uart->lcr);
- uchar ier = readb(&ch->ch_cls_uart->ier);
- uchar isr_fcr = 0;
+ unsigned char lcrb = readb(&ch->ch_cls_uart->lcr);
+ unsigned char ier = readb(&ch->ch_cls_uart->ier);
+ unsigned char isr_fcr = 0;
/*
/* Turn break off, and unset some variables */
if (ch->ch_flags & CH_BREAK_SENDING) {
if (time_after(jiffies, ch->ch_stop_sending_break) || force) {
- uchar temp = readb(&ch->ch_cls_uart->lcr);
+ unsigned char temp = readb(&ch->ch_cls_uart->lcr);
writeb((temp & ~UART_LCR_SBC), &ch->ch_cls_uart->lcr);
ch->ch_flags &= ~(CH_BREAK_SENDING);
static inline void cls_parse_isr(struct dgnc_board *brd, uint port)
{
struct channel_t *ch;
- uchar isr = 0;
+ unsigned char isr = 0;
unsigned long flags;
/*
*/
static void cls_param(struct tty_struct *tty)
{
- uchar lcr = 0;
- uchar uart_lcr = 0;
- uchar ier = 0;
- uchar uart_ier = 0;
+ unsigned char lcr = 0;
+ unsigned char uart_lcr = 0;
+ unsigned char ier = 0;
+ unsigned char uart_ier = 0;
uint baud = 9600;
int quot = 0;
struct dgnc_board *bd;
{
struct dgnc_board *brd = (struct dgnc_board *) voidbrd;
uint i = 0;
- uchar poll_reg;
+ unsigned char poll_reg;
unsigned long flags;
if (!brd) {
static void cls_disable_receiver(struct channel_t *ch)
{
- uchar tmp = readb(&ch->ch_cls_uart->ier);
+ unsigned char tmp = readb(&ch->ch_cls_uart->ier);
tmp &= ~(UART_IER_RDI);
writeb(tmp, &ch->ch_cls_uart->ier);
static void cls_enable_receiver(struct channel_t *ch)
{
- uchar tmp = readb(&ch->ch_cls_uart->ier);
+ unsigned char tmp = readb(&ch->ch_cls_uart->ier);
tmp |= (UART_IER_RDI);
writeb(tmp, &ch->ch_cls_uart->ier);
static void cls_copy_data_from_uart_to_queue(struct channel_t *ch)
{
int qleft = 0;
- uchar linestatus = 0;
- uchar error_mask = 0;
+ unsigned char linestatus = 0;
+ unsigned char error_mask = 0;
ushort head;
ushort tail;
unsigned long flags;
* Discard character if we are ignoring the error mask.
*/
if (linestatus & error_mask) {
- uchar discard;
+ unsigned char discard;
linestatus = 0;
discard = readb(&ch->ch_cls_uart->txrx);
}
-static void cls_parse_modem(struct channel_t *ch, uchar signals)
+static void cls_parse_modem(struct channel_t *ch, unsigned char signals)
{
- uchar msignals = signals;
+ unsigned char msignals = signals;
unsigned long flags;
if (!ch || ch->magic != DGNC_CHANNEL_MAGIC)
*/
spin_lock_irqsave(&ch->ch_lock, flags);
if (ch->ch_digi.digi_flags & DIGI_ALTPIN) {
- uchar mswap = signals;
+ unsigned char mswap = signals;
if (mswap & UART_MSR_DDCD) {
msignals &= ~UART_MSR_DDCD;
/* Make the UART raise any of the output signals we want up */
static void cls_assert_modem_signals(struct channel_t *ch)
{
- uchar out;
+ unsigned char out;
if (!ch || ch->magic != DGNC_CHANNEL_MAGIC)
return;
/* Inits UART */
static void cls_uart_init(struct channel_t *ch)
{
- uchar lcrb = readb(&ch->ch_cls_uart->lcr);
- uchar isr_fcr = 0;
+ unsigned char lcrb = readb(&ch->ch_cls_uart->lcr);
+ unsigned char isr_fcr = 0;
writeb(0, &ch->ch_cls_uart->ier);
*/
static uint cls_get_uart_bytes_left(struct channel_t *ch)
{
- uchar left = 0;
- uchar lsr = 0;
+ unsigned char left = 0;
+ unsigned char lsr = 0;
if (!ch || ch->magic != DGNC_CHANNEL_MAGIC)
return 0;
if (msecs == 0) {
/* Turn break off, and unset some variables */
if (ch->ch_flags & CH_BREAK_SENDING) {
- uchar temp = readb(&ch->ch_cls_uart->lcr);
+ unsigned char temp = readb(&ch->ch_cls_uart->lcr);
writeb((temp & ~UART_LCR_SBC), &ch->ch_cls_uart->lcr);
ch->ch_flags &= ~(CH_BREAK_SENDING);
/* Tell the UART to start sending the break */
if (!(ch->ch_flags & CH_BREAK_SENDING)) {
- uchar temp = readb(&ch->ch_cls_uart->lcr);
+ unsigned char temp = readb(&ch->ch_cls_uart->lcr);
writeb((temp | UART_LCR_SBC), &ch->ch_cls_uart->lcr);
ch->ch_flags |= (CH_BREAK_SENDING);
MODULE_DEVICE_TABLE(pci, dgnc_pci_tbl);
struct board_id {
- uchar *name;
+ unsigned char *name;
uint maxports;
unsigned int is_pci_express;
};
u16 device; /* PCI device ID */
u16 subvendor; /* PCI subsystem vendor ID */
u16 subdevice; /* PCI subsystem device ID */
- uchar rev; /* PCI revision ID */
+ unsigned char rev; /* PCI revision ID */
uint pci_bus; /* PCI bus value */
uint pci_slot; /* PCI slot value */
uint maxports; /* MAX ports this board can handle */
- uchar dvid; /* Board specific device id */
- uchar vpd[128]; /* VPD of board, if found */
- uchar serial_num[20]; /* Serial number of board, if found in VPD */
+ unsigned char dvid; /* Board specific device id */
+ unsigned char vpd[128]; /* VPD of board, if found */
+ unsigned char serial_num[20]; /* Serial number of board, if found in VPD */
spinlock_t bd_lock; /* Used to protect board */
tcflag_t ch_c_cflag; /* channel cflags */
tcflag_t ch_c_oflag; /* channel oflags */
tcflag_t ch_c_lflag; /* channel lflags */
- uchar ch_stopc; /* Stop character */
- uchar ch_startc; /* Start character */
+ unsigned char ch_stopc; /* Stop character */
+ unsigned char ch_startc; /* Start character */
uint ch_old_baud; /* Cache of the current baud */
uint ch_custom_speed;/* Custom baud, if set */
uint ch_wopen; /* Waiting for open process cnt */
- uchar ch_mostat; /* FEP output modem status */
- uchar ch_mistat; /* FEP input modem status */
+ unsigned char ch_mostat; /* FEP output modem status */
+ unsigned char ch_mistat; /* FEP input modem status */
struct neo_uart_struct __iomem *ch_neo_uart; /* Pointer to the "mapped" UART struct */
struct cls_uart_struct __iomem *ch_cls_uart; /* Pointer to the "mapped" UART struct */
- uchar ch_cached_lsr; /* Cached value of the LSR register */
+ unsigned char ch_cached_lsr; /* Cached value of the LSR register */
- uchar *ch_rqueue; /* Our read queue buffer - malloc'ed */
+ unsigned char *ch_rqueue; /* Our read queue buffer - malloc'ed */
ushort ch_r_head; /* Head location of the read queue */
ushort ch_r_tail; /* Tail location of the read queue */
- uchar *ch_equeue; /* Our error queue buffer - malloc'ed */
+ unsigned char *ch_equeue; /* Our error queue buffer - malloc'ed */
ushort ch_e_head; /* Head location of the error queue */
ushort ch_e_tail; /* Tail location of the error queue */
- uchar *ch_wqueue; /* Our write queue buffer - malloc'ed */
+ unsigned char *ch_wqueue; /* Our write queue buffer - malloc'ed */
ushort ch_w_head; /* Head location of the write queue */
ushort ch_w_tail; /* Tail location of the write queue */
ulong ch_rxcount; /* total of data received so far */
ulong ch_txcount; /* total of data transmitted so far */
- uchar ch_r_tlevel; /* Receive Trigger level */
- uchar ch_t_tlevel; /* Transmit Trigger level */
+ unsigned char ch_r_tlevel; /* Receive Trigger level */
+ unsigned char ch_t_tlevel; /* Transmit Trigger level */
- uchar ch_r_watermark; /* Receive Watermark */
+ unsigned char ch_r_watermark; /* Receive Watermark */
ulong ch_stop_sending_break; /* Time we should STOP sending a break */
{
struct channel_t *ch;
struct ni_info ni;
- uchar mstat = 0;
+ unsigned char mstat = 0;
uint board = 0;
uint channel = 0;
static inline void neo_set_no_output_flow_control(struct channel_t *ch);
static inline void neo_set_no_input_flow_control(struct channel_t *ch);
static inline void neo_set_new_start_stop_chars(struct channel_t *ch);
-static void neo_parse_modem(struct channel_t *ch, uchar signals);
+static void neo_parse_modem(struct channel_t *ch, unsigned char signals);
static void neo_tasklet(unsigned long data);
static void neo_vpd(struct dgnc_board *brd);
static void neo_uart_init(struct channel_t *ch);
static inline void neo_set_cts_flow_control(struct channel_t *ch)
{
- uchar ier = readb(&ch->ch_neo_uart->ier);
- uchar efr = readb(&ch->ch_neo_uart->efr);
+ unsigned char ier = readb(&ch->ch_neo_uart->ier);
+ unsigned char efr = readb(&ch->ch_neo_uart->efr);
/* Turn on auto CTS flow control */
static inline void neo_set_rts_flow_control(struct channel_t *ch)
{
- uchar ier = readb(&ch->ch_neo_uart->ier);
- uchar efr = readb(&ch->ch_neo_uart->efr);
+ unsigned char ier = readb(&ch->ch_neo_uart->ier);
+ unsigned char efr = readb(&ch->ch_neo_uart->efr);
/* Turn on auto RTS flow control */
#if 1
static inline void neo_set_ixon_flow_control(struct channel_t *ch)
{
- uchar ier = readb(&ch->ch_neo_uart->ier);
- uchar efr = readb(&ch->ch_neo_uart->efr);
+ unsigned char ier = readb(&ch->ch_neo_uart->ier);
+ unsigned char efr = readb(&ch->ch_neo_uart->efr);
/* Turn off auto CTS flow control */
ier &= ~(UART_17158_IER_CTSDSR);
static inline void neo_set_ixoff_flow_control(struct channel_t *ch)
{
- uchar ier = readb(&ch->ch_neo_uart->ier);
- uchar efr = readb(&ch->ch_neo_uart->efr);
+ unsigned char ier = readb(&ch->ch_neo_uart->ier);
+ unsigned char efr = readb(&ch->ch_neo_uart->efr);
/* Turn off auto RTS flow control */
ier &= ~(UART_17158_IER_RTSDTR);
static inline void neo_set_no_input_flow_control(struct channel_t *ch)
{
- uchar ier = readb(&ch->ch_neo_uart->ier);
- uchar efr = readb(&ch->ch_neo_uart->efr);
+ unsigned char ier = readb(&ch->ch_neo_uart->ier);
+ unsigned char efr = readb(&ch->ch_neo_uart->efr);
/* Turn off auto RTS flow control */
ier &= ~(UART_17158_IER_RTSDTR);
static inline void neo_set_no_output_flow_control(struct channel_t *ch)
{
- uchar ier = readb(&ch->ch_neo_uart->ier);
- uchar efr = readb(&ch->ch_neo_uart->efr);
+ unsigned char ier = readb(&ch->ch_neo_uart->ier);
+ unsigned char efr = readb(&ch->ch_neo_uart->efr);
/* Turn off auto CTS flow control */
ier &= ~(UART_17158_IER_CTSDSR);
if (ch->ch_flags & CH_BREAK_SENDING) {
if (time_after_eq(jiffies, ch->ch_stop_sending_break)
|| force) {
- uchar temp = readb(&ch->ch_neo_uart->lcr);
+ unsigned char temp = readb(&ch->ch_neo_uart->lcr);
writeb((temp & ~UART_LCR_SBC), &ch->ch_neo_uart->lcr);
neo_pci_posting_flush(ch->ch_bd);
static inline void neo_parse_isr(struct dgnc_board *brd, uint port)
{
struct channel_t *ch;
- uchar isr;
- uchar cause;
+ unsigned char isr;
+ unsigned char cause;
unsigned long flags;
if (!brd || brd->magic != DGNC_BOARD_MAGIC)
*/
static void neo_param(struct tty_struct *tty)
{
- uchar lcr = 0;
- uchar uart_lcr = 0;
- uchar ier = 0;
- uchar uart_ier = 0;
+ unsigned char lcr = 0;
+ unsigned char uart_lcr = 0;
+ unsigned char ier = 0;
+ unsigned char uart_ier = 0;
uint baud = 9600;
int quot = 0;
struct dgnc_board *bd;
*/
static void neo_disable_receiver(struct channel_t *ch)
{
- uchar tmp = readb(&ch->ch_neo_uart->ier);
+ unsigned char tmp = readb(&ch->ch_neo_uart->ier);
tmp &= ~(UART_IER_RDI);
writeb(tmp, &ch->ch_neo_uart->ier);
*/
static void neo_enable_receiver(struct channel_t *ch)
{
- uchar tmp = readb(&ch->ch_neo_uart->ier);
+ unsigned char tmp = readb(&ch->ch_neo_uart->ier);
tmp |= (UART_IER_RDI);
writeb(tmp, &ch->ch_neo_uart->ier);
static void neo_copy_data_from_uart_to_queue(struct channel_t *ch)
{
int qleft = 0;
- uchar linestatus = 0;
- uchar error_mask = 0;
+ unsigned char linestatus = 0;
+ unsigned char error_mask = 0;
int n = 0;
int total = 0;
ushort head;
* Discard character if we are ignoring the error mask.
*/
if (linestatus & error_mask) {
- uchar discard;
+ unsigned char discard;
linestatus = 0;
memcpy_fromio(&discard, &ch->ch_neo_uart->txrxburst, 1);
}
memcpy_fromio(ch->ch_rqueue + head, &ch->ch_neo_uart->txrxburst, 1);
- ch->ch_equeue[head] = (uchar) linestatus;
+ ch->ch_equeue[head] = (unsigned char) linestatus;
dgnc_sniff_nowait_nolock(ch, "UART READ", ch->ch_rqueue + head, 1);
/* Ditch any remaining linestatus value. */
*/
static void neo_flush_uart_write(struct channel_t *ch)
{
- uchar tmp = 0;
+ unsigned char tmp = 0;
int i = 0;
if (!ch || ch->magic != DGNC_CHANNEL_MAGIC)
*/
static void neo_flush_uart_read(struct channel_t *ch)
{
- uchar tmp = 0;
+ unsigned char tmp = 0;
int i = 0;
if (!ch || ch->magic != DGNC_CHANNEL_MAGIC)
* If FIFOs are disabled. Send data directly to txrx register
*/
if (!(ch->ch_flags & CH_FIFO_ENABLED)) {
- uchar lsrbits = readb(&ch->ch_neo_uart->lsr);
+ unsigned char lsrbits = readb(&ch->ch_neo_uart->lsr);
/* Cache the LSR bits for later parsing */
ch->ch_cached_lsr |= lsrbits;
}
-static void neo_parse_modem(struct channel_t *ch, uchar signals)
+static void neo_parse_modem(struct channel_t *ch, unsigned char signals)
{
- uchar msignals = signals;
+ unsigned char msignals = signals;
if (!ch || ch->magic != DGNC_CHANNEL_MAGIC)
return;
* This prolly breaks DSRPACE, so we should be more clever here.
*/
if (ch->ch_digi.digi_flags & DIGI_ALTPIN) {
- uchar mswap = msignals;
+ unsigned char mswap = msignals;
if (mswap & UART_MSR_DDCD) {
msignals &= ~UART_MSR_DDCD;
/* Make the UART raise any of the output signals we want up */
static void neo_assert_modem_signals(struct channel_t *ch)
{
- uchar out;
+ unsigned char out;
if (!ch || ch->magic != DGNC_CHANNEL_MAGIC)
return;
static uint neo_get_uart_bytes_left(struct channel_t *ch)
{
- uchar left = 0;
- uchar lsr = readb(&ch->ch_neo_uart->lsr);
+ unsigned char left = 0;
+ unsigned char lsr = readb(&ch->ch_neo_uart->lsr);
/* We must cache the LSR as some of the bits get reset once read... */
ch->ch_cached_lsr |= lsr;
*/
if (msecs == 0) {
if (ch->ch_flags & CH_BREAK_SENDING) {
- uchar temp = readb(&ch->ch_neo_uart->lcr);
+ unsigned char temp = readb(&ch->ch_neo_uart->lcr);
writeb((temp & ~UART_LCR_SBC), &ch->ch_neo_uart->lcr);
neo_pci_posting_flush(ch->ch_bd);
/* Tell the UART to start sending the break */
if (!(ch->ch_flags & CH_BREAK_SENDING)) {
- uchar temp = readb(&ch->ch_neo_uart->lcr);
+ unsigned char temp = readb(&ch->ch_neo_uart->lcr);
writeb((temp | UART_LCR_SBC), &ch->ch_neo_uart->lcr);
neo_pci_posting_flush(ch->ch_bd);
* internal variables
*/
static struct dgnc_board *dgnc_BoardsByMajor[256];
-static uchar *dgnc_TmpWriteBuf;
+static unsigned char *dgnc_TmpWriteBuf;
static DECLARE_MUTEX(dgnc_TmpWriteSem);
/*
* dgnc_sniff - Dump data out to the "sniff" buffer if the
* proc sniff file is opened...
*/
-void dgnc_sniff_nowait_nolock(struct channel_t *ch, uchar *text, uchar *buf, int len)
+void dgnc_sniff_nowait_nolock(struct channel_t *ch, unsigned char *text, unsigned char *buf, int len)
{
struct timeval tv;
int n;
* copy_from_user() returns the number
* of bytes that could *NOT* be copied.
*/
- count -= copy_from_user(dgnc_TmpWriteBuf, (const uchar __user *) buf, count);
+ count -= copy_from_user(dgnc_TmpWriteBuf, (const unsigned char __user *) buf, count);
if (!count) {
up(&dgnc_TmpWriteSem);
struct channel_t *ch;
struct un_t *un;
int result = -EIO;
- uchar mstat = 0;
+ unsigned char mstat = 0;
unsigned long flags;
if (!tty || tty->magic != TTY_MAGIC)
void dgnc_wakeup_writes(struct channel_t *ch);
void dgnc_check_queue_flow_control(struct channel_t *ch);
-void dgnc_sniff_nowait_nolock(struct channel_t *ch, uchar *text, uchar *buf, int nbuf);
+void dgnc_sniff_nowait_nolock(struct channel_t *ch, unsigned char *text, unsigned char *buf, int nbuf);
#endif
# define FALSE 0
#endif
-/* Required for our shared headers! */
-typedef unsigned char uchar;
-
#endif