提交 f1e51745 编写于 作者: S Seunghun Lee 提交者: Greg Kroah-Hartman

staging: dgnc: remove DPR Macros and related codes.

In dgnc_drivers.h, DPR macro and DPR_* macros are defined but do nothing.

So remove them and related codes.

CC: Lidza Louina <lidza.louina@gmail.com>
CC: Mark Hounschell <markh@compro.net>
Signed-off-by: NSeunghun Lee <waydi1@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 ebb10d8e
......@@ -99,7 +99,6 @@ static inline void cls_set_cts_flow_control(struct channel_t *ch)
uchar ier = readb(&ch->ch_cls_uart->ier);
uchar isr_fcr = 0;
DPR_PARAM(("Setting CTSFLOW\n"));
/*
* The Enhanced Register Set may only be accessed when
......@@ -144,7 +143,6 @@ static inline void cls_set_ixon_flow_control(struct channel_t *ch)
uchar ier = readb(&ch->ch_cls_uart->ier);
uchar isr_fcr = 0;
DPR_PARAM(("Setting IXON FLOW\n"));
/*
* The Enhanced Register Set may only be accessed when
......@@ -193,7 +191,6 @@ static inline void cls_set_no_output_flow_control(struct channel_t *ch)
uchar ier = readb(&ch->ch_cls_uart->ier);
uchar isr_fcr = 0;
DPR_PARAM(("Unsetting Output FLOW\n"));
/*
* The Enhanced Register Set may only be accessed when
......@@ -240,7 +237,6 @@ static inline void cls_set_rts_flow_control(struct channel_t *ch)
uchar ier = readb(&ch->ch_cls_uart->ier);
uchar isr_fcr = 0;
DPR_PARAM(("Setting RTSFLOW\n"));
/*
* The Enhanced Register Set may only be accessed when
......@@ -283,7 +279,6 @@ static inline void cls_set_ixoff_flow_control(struct channel_t *ch)
uchar ier = readb(&ch->ch_cls_uart->ier);
uchar isr_fcr = 0;
DPR_PARAM(("Setting IXOFF FLOW\n"));
/*
* The Enhanced Register Set may only be accessed when
......@@ -328,7 +323,6 @@ static inline void cls_set_no_input_flow_control(struct channel_t *ch)
uchar ier = readb(&ch->ch_cls_uart->ier);
uchar isr_fcr = 0;
DPR_PARAM(("Unsetting Input FLOW\n"));
/*
* The Enhanced Register Set may only be accessed when
......@@ -394,8 +388,6 @@ static inline void cls_clear_break(struct channel_t *ch, int force)
writeb((temp & ~UART_LCR_SBC), &ch->ch_cls_uart->lcr);
ch->ch_flags &= ~(CH_BREAK_SENDING);
ch->ch_stop_sending_break = 0;
DPR_IOCTL(("Finishing UART_LCR_SBC! finished: %lx\n",
jiffies));
}
}
DGNC_UNLOCK(ch->ch_lock, lock_flags);
......@@ -430,9 +422,6 @@ static inline void cls_parse_isr(struct dgnc_board *brd, uint port)
if (isr & UART_IIR_NO_INT)
break;
DPR_INTR(("%s:%d port: %x isr: %x\n", __FILE__, __LINE__,
port, isr));
/* Receive Interrupt pending */
if (isr & (UART_IIR_RDI | UART_IIR_RDI_TIMEOUT)) {
/* Read data from uart -> queue */
......@@ -464,7 +453,6 @@ static inline void cls_parse_isr(struct dgnc_board *brd, uint port)
}
/* Parse any modem signal changes */
DPR_INTR(("MOD_STAT: sending to parse_modem_sigs\n"));
cls_parse_modem(ch, readb(&ch->ch_cls_uart->msr));
}
}
......@@ -501,10 +489,6 @@ static void cls_param(struct tty_struct *tty)
if (!bd || bd->magic != DGNC_BOARD_MAGIC)
return;
DPR_PARAM(("param start: tdev: %x cflags: %x oflags: %x iflags: %x\n",
ch->ch_tun.un_dev, ch->ch_c_cflag, ch->ch_c_oflag,
ch->ch_c_iflag));
/*
* If baud rate is zero, flush queues, and set mval to drop DTR.
*/
......@@ -588,8 +572,6 @@ static void cls_param(struct tty_struct *tty)
(jindex < 16)) {
baud = bauds[iindex][jindex];
} else {
DPR_IOCTL(("baud indices were out of range (%d)(%d)",
iindex, jindex));
baud = 0;
}
......@@ -840,14 +822,10 @@ static irqreturn_t cls_intr(int irq, void *voidbrd)
/* If 0, no interrupts pending */
if (!poll_reg) {
DPR_INTR((
"Kernel interrupted to me, but no pending interrupts...\n"));
DGNC_UNLOCK(brd->bd_intr_lock, lock_flags);
return IRQ_NONE;
}
DPR_INTR(("%s:%d poll_reg: %x\n", __FILE__, __LINE__, poll_reg));
/* Parse each port to find out what caused the interrupt */
for (i = 0; i < brd->nasync; i++)
cls_parse_isr(brd, i);
......@@ -859,7 +837,6 @@ static irqreturn_t cls_intr(int irq, void *voidbrd)
DGNC_UNLOCK(brd->bd_intr_lock, lock_flags);
DPR_INTR(("dgnc_intr finish.\n"));
return IRQ_HANDLED;
}
......@@ -938,9 +915,6 @@ static void cls_copy_data_from_uart_to_queue(struct channel_t *ch)
* I hope thats okay with everyone? Yes? Good.
*/
while (qleft < 1) {
DPR_READ(("Queue full, dropping DATA:%x LSR:%x\n",
ch->ch_rqueue[tail], ch->ch_equeue[tail]));
ch->ch_r_tail = tail = (tail + 1) & RQUEUEMASK;
ch->ch_err_overrun++;
qleft++;
......@@ -954,9 +928,6 @@ static void cls_copy_data_from_uart_to_queue(struct channel_t *ch)
qleft--;
DPR_READ(("DATA/LSR pair: %x %x\n", ch->ch_rqueue[head],
ch->ch_equeue[head]));
if (ch->ch_equeue[head] & UART_LSR_PE)
ch->ch_err_parity++;
if (ch->ch_equeue[head] & UART_LSR_BI)
......@@ -1012,8 +983,6 @@ static int cls_drain(struct tty_struct *tty, uint seconds)
((un->un_flags & UN_EMPTY) == 0));
/* If ret is non-zero, user ctrl-c'ed us */
if (rc)
DPR_IOCTL(("%d Drain - User ctrl c'ed\n", __LINE__));
return rc;
}
......@@ -1126,7 +1095,6 @@ static void cls_copy_data_from_queue_to_uart(struct channel_t *ch)
writeb(ch->ch_wqueue[ch->ch_w_tail], &ch->ch_cls_uart->txrx);
dgnc_sniff_nowait_nolock(ch, "UART WRITE",
ch->ch_wqueue + ch->ch_w_tail, 1);
DPR_WRITE(("Tx data: %x\n", ch->ch_wqueue[ch->ch_w_tail]));
ch->ch_w_tail++;
ch->ch_w_tail &= WQUEUEMASK;
ch->ch_txcount++;
......@@ -1149,9 +1117,6 @@ static void cls_parse_modem(struct channel_t *ch, uchar signals)
if (!ch || ch->magic != DGNC_CHANNEL_MAGIC)
return;
DPR_MSIGS(("cls_parse_modem: port: %d signals: %d\n",
ch->ch_portnum, msignals));
/*
* Do altpin switching. Altpin switches DCD and DSR.
* This prolly breaks DSRPACE, so we should be more clever here.
......@@ -1206,17 +1171,6 @@ static void cls_parse_modem(struct channel_t *ch, uchar signals)
else
ch->ch_mistat &= ~UART_MSR_CTS;
DGNC_UNLOCK(ch->ch_lock, lock_flags);
DPR_MSIGS((
"Port: %d DTR: %d RTS: %d CTS: %d DSR: %d " "RI: %d CD: %d\n",
ch->ch_portnum,
!!((ch->ch_mistat | ch->ch_mostat) & UART_MCR_DTR),
!!((ch->ch_mistat | ch->ch_mostat) & UART_MCR_RTS),
!!((ch->ch_mistat | ch->ch_mostat) & UART_MSR_CTS),
!!((ch->ch_mistat | ch->ch_mostat) & UART_MSR_DSR),
!!((ch->ch_mistat | ch->ch_mostat) & UART_MSR_RI),
!!((ch->ch_mistat | ch->ch_mostat) & UART_MSR_DCD)));
}
......@@ -1363,8 +1317,6 @@ static void cls_send_break(struct channel_t *ch, int msecs)
writeb((temp & ~UART_LCR_SBC), &ch->ch_cls_uart->lcr);
ch->ch_flags &= ~(CH_BREAK_SENDING);
ch->ch_stop_sending_break = 0;
DPR_IOCTL(("Finishing UART_LCR_SBC! finished: %lx\n",
jiffies));
}
return;
}
......@@ -1382,9 +1334,6 @@ static void cls_send_break(struct channel_t *ch, int msecs)
writeb((temp | UART_LCR_SBC), &ch->ch_cls_uart->lcr);
ch->ch_flags |= (CH_BREAK_SENDING);
DPR_IOCTL((
"Port %d. Starting UART_LCR_SBC! start: %lx should end: %lx\n",
ch->ch_portnum, jiffies, ch->ch_stop_sending_break));
}
}
......
......@@ -250,7 +250,6 @@ static int __init dgnc_init_module(void)
dgnc_create_driver_sysfiles(&dgnc_driver);
}
DPR_INIT(("Finished init_module. Returning %d\n", rc));
return rc;
}
......@@ -325,10 +324,8 @@ static int dgnc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
rc = -EIO;
} else {
rc = dgnc_found_board(pdev, ent->driver_data);
if (rc == 0) {
if (rc == 0)
dgnc_NumBoards++;
DPR_INIT(("Incrementing numboards to %d\n", dgnc_NumBoards));
}
}
return rc;
}
......@@ -467,8 +464,6 @@ static int dgnc_found_board(struct pci_dev *pdev, int id)
brd->dpatype = T_CLASSIC | T_PCIBUS;
DPR_INIT(("dgnc_found_board - Classic.\n"));
/*
* For PCI ClassicBoards
* PCI Local Address (i.e. "resource" number) space
......@@ -543,8 +538,6 @@ static int dgnc_found_board(struct pci_dev *pdev, int id)
else
brd->dpatype = T_NEO | T_PCIBUS;
DPR_INIT(("dgnc_found_board - NEO.\n"));
/* get the PCI Base Address Registers */
brd->membase = pci_resource_start(pdev, 0);
brd->membase_end = pci_resource_end(pdev, 0);
......@@ -618,7 +611,6 @@ static int dgnc_found_board(struct pci_dev *pdev, int id)
/* init our poll helper tasklet */
tasklet_init(&brd->helper_tasklet, brd->bd_ops->tasklet, (unsigned long) brd);
DPR_INIT(("dgnc_scan(%d) - printing out the msgbuf\n", i));
DGNC_LOCK(dgnc_global_lock, flags);
brd->msgbuf = NULL;
printk("%s", brd->msgbuf_head);
......@@ -649,13 +641,9 @@ static int dgnc_finalize_board_init(struct dgnc_board *brd)
{
int rc = 0;
DPR_INIT(("dgnc_finalize_board_init() - start\n"));
if (!brd || brd->magic != DGNC_BOARD_MAGIC)
return -ENODEV;
DPR_INIT(("dgnc_finalize_board_init() - start #2\n"));
if (brd->irq) {
rc = request_irq(brd->irq, brd->bd_ops->intr,
IRQF_SHARED, "DGNC", brd);
......@@ -666,9 +654,6 @@ static int dgnc_finalize_board_init(struct dgnc_board *brd)
brd->state = BOARD_FAILED;
brd->dpastatus = BD_NOFEP;
rc = -ENODEV;
} else {
DPR_INIT(("Requested and received usage of IRQ %d\n",
brd->irq));
}
}
return rc;
......@@ -684,8 +669,6 @@ static void dgnc_do_remap(struct dgnc_board *brd)
return;
brd->re_map_membase = ioremap(brd->membase, 0x1000);
DPR_INIT(("remapped mem: 0x%p\n", brd->re_map_membase));
}
......
......@@ -49,8 +49,6 @@
* three lines, and the driver printk's will all automagically change.
*
* APR((fmt, args, ...)); Always prints message
* DPR((fmt, args, ...)); Only prints if DGNC_TRACER is defined at
* compile time and dgnc_debug!=0
*/
#define PROCSTR "dgnc" /* /proc entries */
#define DEVSTR "/dev/dg/dgnc" /* /dev entries */
......@@ -93,25 +91,6 @@
#define PRINTF_TO_KMEM(args)
# define TRC(ARGS)
# define DPR_INIT(ARGS)
# define DPR_BASIC(ARGS)
# define DPR_CORE(ARGS)
# define DPR_OPEN(ARGS)
# define DPR_CLOSE(ARGS)
# define DPR_READ(ARGS)
# define DPR_WRITE(ARGS)
# define DPR_IOCTL(ARGS)
# define DPR_PROC(ARGS)
# define DPR_PARAM(ARGS)
# define DPR_PSCAN(ARGS)
# define DPR_EVENT(ARGS)
# define DPR_DRAIN(ARGS)
# define DPR_CARR(ARGS)
# define DPR_MGMT(ARGS)
# define DPR_INTR(ARGS)
# define DPR_MSIGS(ARGS)
# define DPR(args)
/* Number of boards we support at once. */
#define MAXBOARDS 20
......
......@@ -65,8 +65,6 @@ int dgnc_mgmt_open(struct inode *inode, struct file *file)
unsigned long lock_flags;
unsigned int minor = iminor(inode);
DPR_MGMT(("dgnc_mgmt_open start.\n"));
DGNC_LOCK(dgnc_global_lock, lock_flags);
/* mgmt device */
......@@ -84,8 +82,6 @@ int dgnc_mgmt_open(struct inode *inode, struct file *file)
DGNC_UNLOCK(dgnc_global_lock, lock_flags);
DPR_MGMT(("dgnc_mgmt_open finish.\n"));
return 0;
}
......@@ -100,8 +96,6 @@ int dgnc_mgmt_close(struct inode *inode, struct file *file)
unsigned long lock_flags;
unsigned int minor = iminor(inode);
DPR_MGMT(("dgnc_mgmt_close start.\n"));
DGNC_LOCK(dgnc_global_lock, lock_flags);
/* mgmt device */
......@@ -111,8 +105,6 @@ int dgnc_mgmt_close(struct inode *inode, struct file *file)
}
DGNC_UNLOCK(dgnc_global_lock, lock_flags);
DPR_MGMT(("dgnc_mgmt_close finish.\n"));
return 0;
}
......@@ -128,8 +120,6 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
unsigned long lock_flags;
void __user *uarg = (void __user *) arg;
DPR_MGMT(("dgnc_mgmt_ioctl start.\n"));
switch (cmd) {
case DIGI_GETDD:
......@@ -148,9 +138,6 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
DGNC_UNLOCK(dgnc_global_lock, lock_flags);
DPR_MGMT(("DIGI_GETDD returning numboards: %d version: %s\n",
ddi.dinfo_nboards, ddi.dinfo_version));
if (copy_to_user(uarg, &ddi, sizeof(ddi)))
return -EFAULT;
......@@ -166,8 +153,6 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
if (copy_from_user(&brd, uarg, sizeof(int)))
return -EFAULT;
DPR_MGMT(("DIGI_GETBD asking about board: %d\n", brd));
if ((brd < 0) || (brd > dgnc_NumBoards) ||
(dgnc_NumBoards == 0))
return -ENODEV;
......@@ -190,9 +175,6 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
DGNC_UNLOCK(dgnc_Board[brd]->bd_lock, lock_flags);
DPR_MGMT(("DIGI_GETBD returning type: %x state: %x ports: %x size: %x\n",
di.info_bdtype, di.info_bdstate, di.info_nports, di.info_physsize));
if (copy_to_user(uarg, &di, sizeof(di)))
return -EFAULT;
......@@ -210,9 +192,6 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
if (copy_from_user(&ni, uarg, sizeof(ni)))
return -EFAULT;
DPR_MGMT(("DIGI_GETBD asking about board: %d channel: %d\n",
ni.board, ni.channel));
board = ni.board;
channel = ni.channel;
......@@ -298,7 +277,5 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
}
DPR_MGMT(("dgnc_mgmt_ioctl finish.\n"));
return 0;
}
......@@ -117,8 +117,6 @@ static inline void neo_set_cts_flow_control(struct channel_t *ch)
uchar efr = readb(&ch->ch_neo_uart->efr);
DPR_PARAM(("Setting CTSFLOW\n"));
/* Turn on auto CTS flow control */
#if 1
ier |= (UART_17158_IER_CTSDSR);
......@@ -155,8 +153,6 @@ 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);
DPR_PARAM(("Setting RTSFLOW\n"));
/* Turn on auto RTS flow control */
#if 1
ier |= (UART_17158_IER_RTSDTR);
......@@ -200,8 +196,6 @@ 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);
DPR_PARAM(("Setting IXON FLOW\n"));
/* Turn off auto CTS flow control */
ier &= ~(UART_17158_IER_CTSDSR);
efr &= ~(UART_17158_EFR_CTSDSR);
......@@ -239,8 +233,6 @@ 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);
DPR_PARAM(("Setting IXOFF FLOW\n"));
/* Turn off auto RTS flow control */
ier &= ~(UART_17158_IER_RTSDTR);
efr &= ~(UART_17158_EFR_RTSDTR);
......@@ -279,8 +271,6 @@ 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);
DPR_PARAM(("Unsetting Input FLOW\n"));
/* Turn off auto RTS flow control */
ier &= ~(UART_17158_IER_RTSDTR);
efr &= ~(UART_17158_EFR_RTSDTR);
......@@ -321,8 +311,6 @@ 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);
DPR_PARAM(("Unsetting Output FLOW\n"));
/* Turn off auto CTS flow control */
ier &= ~(UART_17158_IER_CTSDSR);
efr &= ~(UART_17158_EFR_CTSDSR);
......@@ -364,8 +352,6 @@ static inline void neo_set_new_start_stop_chars(struct channel_t *ch)
if (ch->ch_digi.digi_flags & (CTSPACE | RTSPACE) || ch->ch_c_cflag & CRTSCTS)
return;
DPR_PARAM(("In new start stop chars\n"));
/* Tell UART what start/stop chars it should be looking for */
writeb(ch->ch_startc, &ch->ch_neo_uart->xonchar1);
writeb(0, &ch->ch_neo_uart->xonchar2);
......@@ -402,7 +388,6 @@ static inline void neo_clear_break(struct channel_t *ch, int force)
neo_pci_posting_flush(ch->ch_bd);
ch->ch_flags &= ~(CH_BREAK_SENDING);
ch->ch_stop_sending_break = 0;
DPR_IOCTL(("Finishing UART_LCR_SBC! finished: %lx\n", jiffies));
}
}
DGNC_UNLOCK(ch->ch_lock, lock_flags);
......@@ -443,8 +428,6 @@ static inline void neo_parse_isr(struct dgnc_board *brd, uint port)
*/
isr &= ~(UART_17158_IIR_FIFO_ENABLED);
DPR_INTR(("%s:%d isr: %x\n", __FILE__, __LINE__, isr));
if (isr & (UART_17158_IIR_RDI_TIMEOUT | UART_IIR_RDI)) {
/* Read data from uart -> queue */
brd->intr_rx++;
......@@ -470,8 +453,6 @@ static inline void neo_parse_isr(struct dgnc_board *brd, uint port)
if (isr & UART_17158_IIR_XONXOFF) {
cause = readb(&ch->ch_neo_uart->xoffchar1);
DPR_INTR(("Port %d. Got ISR_XONXOFF: cause:%x\n", port, cause));
/*
* Since the UART detected either an XON or
* XOFF match, we need to figure out which
......@@ -484,15 +465,12 @@ static inline void neo_parse_isr(struct dgnc_board *brd, uint port)
ch->ch_flags &= ~(CH_STOP);
DGNC_UNLOCK(ch->ch_lock, lock_flags);
}
DPR_INTR(("Port %d. XON detected in incoming data\n", port));
} else if (cause == UART_17158_XOFF_DETECT) {
if (!(brd->channels[port]->ch_flags & CH_STOP)) {
DGNC_LOCK(ch->ch_lock, lock_flags);
ch->ch_flags |= CH_STOP;
DGNC_UNLOCK(ch->ch_lock, lock_flags);
DPR_INTR(("Setting CH_STOP\n"));
}
DPR_INTR(("Port: %d. XOFF detected in incoming data\n", port));
}
}
......@@ -529,7 +507,6 @@ static inline void neo_parse_isr(struct dgnc_board *brd, uint port)
}
/* Parse any modem signal changes */
DPR_INTR(("MOD_STAT: sending to parse_modem_sigs\n"));
neo_parse_modem(ch, readb(&ch->ch_neo_uart->msr));
}
}
......@@ -556,8 +533,6 @@ static inline void neo_parse_lsr(struct dgnc_board *brd, uint port)
linestatus = readb(&ch->ch_neo_uart->lsr);
DPR_INTR(("%s:%d port: %d linestatus: %x\n", __FILE__, __LINE__, port, linestatus));
ch->ch_cached_lsr |= linestatus;
if (ch->ch_cached_lsr & UART_LSR_DR) {
......@@ -570,36 +545,19 @@ static inline void neo_parse_lsr(struct dgnc_board *brd, uint port)
DGNC_UNLOCK(ch->ch_lock, lock_flags);
}
/*
* This is a special flag. It indicates that at least 1
* RX error (parity, framing, or break) has happened.
* Mark this in our struct, which will tell me that I have
*to do the special RX+LSR read for this FIFO load.
*/
if (linestatus & UART_17158_RX_FIFO_DATA_ERROR) {
DPR_INTR(("%s:%d Port: %d Got an RX error, need to parse LSR\n",
__FILE__, __LINE__, port));
}
/*
* The next 3 tests should *NOT* happen, as the above test
* should encapsulate all 3... At least, thats what Exar says.
*/
if (linestatus & UART_LSR_PE) {
if (linestatus & UART_LSR_PE)
ch->ch_err_parity++;
DPR_INTR(("%s:%d Port: %d. PAR ERR!\n", __FILE__, __LINE__, port));
}
if (linestatus & UART_LSR_FE) {
if (linestatus & UART_LSR_FE)
ch->ch_err_frame++;
DPR_INTR(("%s:%d Port: %d. FRM ERR!\n", __FILE__, __LINE__, port));
}
if (linestatus & UART_LSR_BI) {
if (linestatus & UART_LSR_BI)
ch->ch_err_break++;
DPR_INTR(("%s:%d Port: %d. BRK INTR!\n", __FILE__, __LINE__, port));
}
if (linestatus & UART_LSR_OE) {
/*
......@@ -609,7 +567,6 @@ static inline void neo_parse_lsr(struct dgnc_board *brd, uint port)
* Probably we should eventually have an orun stat in our driver...
*/
ch->ch_err_overrun++;
DPR_INTR(("%s:%d Port: %d. Rx Overrun!\n", __FILE__, __LINE__, port));
}
if (linestatus & UART_LSR_THRE) {
......@@ -665,9 +622,6 @@ static void neo_param(struct tty_struct *tty)
if (!bd || bd->magic != DGNC_BOARD_MAGIC)
return;
DPR_PARAM(("param start: tdev: %x cflags: %x oflags: %x iflags: %x\n",
ch->ch_tun.un_dev, ch->ch_c_cflag, ch->ch_c_oflag, ch->ch_c_iflag));
/*
* If baud rate is zero, flush queues, and set mval to drop DTR.
*/
......@@ -743,13 +697,10 @@ static void neo_param(struct tty_struct *tty)
jindex = baud;
if ((iindex >= 0) && (iindex < 4) && (jindex >= 0) && (jindex < 16)) {
if ((iindex >= 0) && (iindex < 4) && (jindex >= 0) && (jindex < 16))
baud = bauds[iindex][jindex];
} else {
DPR_IOCTL(("baud indices were out of range (%d)(%d)",
iindex, jindex));
else
baud = 0;
}
if (baud == 0)
baud = 9600;
......@@ -1012,14 +963,11 @@ static irqreturn_t neo_intr(int irq, void *voidbrd)
*/
uart_poll = readl(brd->re_map_membase + UART_17158_POLL_ADDR_OFFSET);
DPR_INTR(("%s:%d uart_poll: %x\n", __FILE__, __LINE__, uart_poll));
/*
* If 0, no interrupts pending.
* This can happen if the IRQ is shared among a couple Neo/Classic boards.
*/
if (!uart_poll) {
DPR_INTR(("Kernel interrupted to me, but no pending interrupts...\n"));
DGNC_UNLOCK(brd->bd_intr_lock, lock_flags);
return IRQ_NONE;
}
......@@ -1043,14 +991,11 @@ static irqreturn_t neo_intr(int irq, void *voidbrd)
continue;
}
DPR_INTR(("%s:%d port: %x type: %x\n", __FILE__, __LINE__, port, type));
/* Remove this port + type from uart_poll */
uart_poll &= ~(dgnc_offset_table[port]);
if (!type) {
/* If no type, just ignore it, and move onto next port */
DPR_INTR(("Interrupt with no type! port: %d\n", port));
continue;
}
......@@ -1114,7 +1059,6 @@ static irqreturn_t neo_intr(int irq, void *voidbrd)
* these once and awhile.
* Its harmless, just ignore it and move on.
*/
DPR_INTR(("%s:%d Unknown Interrupt type: %x\n", __FILE__, __LINE__, type));
continue;
}
}
......@@ -1126,7 +1070,6 @@ static irqreturn_t neo_intr(int irq, void *voidbrd)
DGNC_UNLOCK(brd->bd_intr_lock, lock_flags);
DPR_INTR(("dgnc_intr finish.\n"));
return IRQ_HANDLED;
}
......@@ -1342,9 +1285,6 @@ static void neo_copy_data_from_uart_to_queue(struct channel_t *ch)
* I hope thats okay with everyone? Yes? Good.
*/
while (qleft < 1) {
DPR_READ(("Queue full, dropping DATA:%x LSR:%x\n",
ch->ch_rqueue[tail], ch->ch_equeue[tail]));
ch->ch_r_tail = tail = (tail + 1) & RQUEUEMASK;
ch->ch_err_overrun++;
qleft++;
......@@ -1354,8 +1294,6 @@ static void neo_copy_data_from_uart_to_queue(struct channel_t *ch)
ch->ch_equeue[head] = (uchar) linestatus;
dgnc_sniff_nowait_nolock(ch, "UART READ", ch->ch_rqueue + head, 1);
DPR_READ(("DATA/LSR pair: %x %x\n", ch->ch_rqueue[head], ch->ch_equeue[head]));
/* Ditch any remaining linestatus value. */
linestatus = 0;
......@@ -1398,8 +1336,6 @@ static int neo_drain(struct tty_struct *tty, uint seconds)
if (!ch || ch->magic != DGNC_CHANNEL_MAGIC)
return -ENXIO;
DPR_IOCTL(("%d Drain wait started.\n", __LINE__));
DGNC_LOCK(ch->ch_lock, lock_flags);
un->un_flags |= UN_EMPTY;
DGNC_UNLOCK(ch->ch_lock, lock_flags);
......@@ -1413,11 +1349,6 @@ static int neo_drain(struct tty_struct *tty, uint seconds)
rc = wait_event_interruptible(un->un_flags_wait, ((un->un_flags & UN_EMPTY) == 0));
/* If ret is non-zero, user ctrl-c'ed us */
if (rc)
DPR_IOCTL(("%d Drain - User ctrl c'ed\n", __LINE__));
else
DPR_IOCTL(("%d Drain wait finished.\n", __LINE__));
return rc;
}
......@@ -1442,10 +1373,9 @@ static void neo_flush_uart_write(struct channel_t *ch)
/* Check to see if the UART feels it completely flushed the FIFO. */
tmp = readb(&ch->ch_neo_uart->isr_fcr);
if (tmp & 4) {
DPR_IOCTL(("Still flushing TX UART... i: %d\n", i));
if (tmp & 4)
udelay(10);
} else
else
break;
}
......@@ -1473,10 +1403,9 @@ static void neo_flush_uart_read(struct channel_t *ch)
/* Check to see if the UART feels it completely flushed the FIFO. */
tmp = readb(&ch->ch_neo_uart->isr_fcr);
if (tmp & 2) {
DPR_IOCTL(("Still flushing RX UART... i: %d\n", i));
if (tmp & 2)
udelay(10);
} else
else
break;
}
}
......@@ -1544,7 +1473,6 @@ static void neo_copy_data_from_queue_to_uart(struct channel_t *ch)
}
writeb(ch->ch_wqueue[ch->ch_w_tail], &ch->ch_neo_uart->txrx);
DPR_WRITE(("Tx data: %x\n", ch->ch_wqueue[ch->ch_w_head]));
ch->ch_w_tail++;
ch->ch_w_tail &= WQUEUEMASK;
ch->ch_txcount++;
......@@ -1645,8 +1573,6 @@ static void neo_parse_modem(struct channel_t *ch, uchar signals)
if (!ch || ch->magic != DGNC_CHANNEL_MAGIC)
return;
DPR_MSIGS(("neo_parse_modem: port: %d msignals: %x\n", ch->ch_portnum, msignals));
/*
* Do altpin switching. Altpin switches DCD and DSR.
* This prolly breaks DSRPACE, so we should be more clever here.
......@@ -1694,15 +1620,6 @@ static void neo_parse_modem(struct channel_t *ch, uchar signals)
ch->ch_mistat |= UART_MSR_CTS;
else
ch->ch_mistat &= ~UART_MSR_CTS;
DPR_MSIGS(("Port: %d DTR: %d RTS: %d CTS: %d DSR: %d " "RI: %d CD: %d\n",
ch->ch_portnum,
!!((ch->ch_mistat | ch->ch_mostat) & UART_MCR_DTR),
!!((ch->ch_mistat | ch->ch_mostat) & UART_MCR_RTS),
!!((ch->ch_mistat | ch->ch_mostat) & UART_MSR_CTS),
!!((ch->ch_mistat | ch->ch_mostat) & UART_MSR_DSR),
!!((ch->ch_mistat | ch->ch_mostat) & UART_MSR_RI),
!!((ch->ch_mistat | ch->ch_mostat) & UART_MSR_DCD)));
}
......@@ -1830,7 +1747,6 @@ static void neo_send_break(struct channel_t *ch, int msecs)
neo_pci_posting_flush(ch->ch_bd);
ch->ch_flags &= ~(CH_BREAK_SENDING);
ch->ch_stop_sending_break = 0;
DPR_IOCTL(("Finishing UART_LCR_SBC! finished: %lx\n", jiffies));
}
return;
}
......@@ -1849,8 +1765,6 @@ static void neo_send_break(struct channel_t *ch, int msecs)
writeb((temp | UART_LCR_SBC), &ch->ch_neo_uart->lcr);
neo_pci_posting_flush(ch->ch_bd);
ch->ch_flags |= (CH_BREAK_SENDING);
DPR_IOCTL(("Port %d. Starting UART_LCR_SBC! start: %lx should end: %lx\n",
ch->ch_portnum, jiffies, ch->ch_stop_sending_break));
}
}
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册