aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/synclink_gt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/synclink_gt.c')
-rw-r--r--drivers/char/synclink_gt.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c
index e829594195c1..2f07b085536b 100644
--- a/drivers/char/synclink_gt.c
+++ b/drivers/char/synclink_gt.c
@@ -391,8 +391,8 @@ static MGSL_PARAMS default_params = {
391#define DESC_LIST_SIZE 4096 391#define DESC_LIST_SIZE 4096
392 392
393#define MASK_PARITY BIT1 393#define MASK_PARITY BIT1
394#define MASK_FRAMING BIT2 394#define MASK_FRAMING BIT0
395#define MASK_BREAK BIT3 395#define MASK_BREAK BIT14
396#define MASK_OVERRUN BIT4 396#define MASK_OVERRUN BIT4
397 397
398#define GSR 0x00 /* global status */ 398#define GSR 0x00 /* global status */
@@ -1497,8 +1497,10 @@ static int hdlcdev_open(struct net_device *dev)
1497 spin_lock_irqsave(&info->lock, flags); 1497 spin_lock_irqsave(&info->lock, flags);
1498 get_signals(info); 1498 get_signals(info);
1499 spin_unlock_irqrestore(&info->lock, flags); 1499 spin_unlock_irqrestore(&info->lock, flags);
1500 hdlc_set_carrier(info->signals & SerialSignal_DCD, dev); 1500 if (info->signals & SerialSignal_DCD)
1501 1501 netif_carrier_on(dev);
1502 else
1503 netif_carrier_off(dev);
1502 return 0; 1504 return 0;
1503} 1505}
1504 1506
@@ -1798,17 +1800,17 @@ static void rx_async(struct slgt_info *info)
1798 1800
1799 stat = 0; 1801 stat = 0;
1800 1802
1801 if ((status = *(p+1) & (BIT9 + BIT8))) { 1803 if ((status = *(p+1) & (BIT1 + BIT0))) {
1802 if (status & BIT9) 1804 if (status & BIT1)
1803 icount->parity++; 1805 icount->parity++;
1804 else if (status & BIT8) 1806 else if (status & BIT0)
1805 icount->frame++; 1807 icount->frame++;
1806 /* discard char if tty control flags say so */ 1808 /* discard char if tty control flags say so */
1807 if (status & info->ignore_status_mask) 1809 if (status & info->ignore_status_mask)
1808 continue; 1810 continue;
1809 if (status & BIT9) 1811 if (status & BIT1)
1810 stat = TTY_PARITY; 1812 stat = TTY_PARITY;
1811 else if (status & BIT8) 1813 else if (status & BIT0)
1812 stat = TTY_FRAME; 1814 stat = TTY_FRAME;
1813 } 1815 }
1814 if (tty) { 1816 if (tty) {
@@ -1997,8 +1999,12 @@ static void dcd_change(struct slgt_info *info)
1997 info->input_signal_events.dcd_down++; 1999 info->input_signal_events.dcd_down++;
1998 } 2000 }
1999#ifdef CONFIG_HDLC 2001#ifdef CONFIG_HDLC
2000 if (info->netcount) 2002 if (info->netcount) {
2001 hdlc_set_carrier(info->signals & SerialSignal_DCD, info->netdev); 2003 if (info->signals & SerialSignal_DCD)
2004 netif_carrier_on(info->netdev);
2005 else
2006 netif_carrier_off(info->netdev);
2007 }
2002#endif 2008#endif
2003 wake_up_interruptible(&info->status_event_wait_q); 2009 wake_up_interruptible(&info->status_event_wait_q);
2004 wake_up_interruptible(&info->event_wait_q); 2010 wake_up_interruptible(&info->event_wait_q);