diff options
author | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-08-27 22:59:59 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-08-27 22:59:59 -0400 |
commit | 8ce7a9c159c8c4eb480f0a65c6af753dbf9a1a70 (patch) | |
tree | be59573c0af3617d0cd8a7d61f0ed119e58b1156 /drivers/net/wan | |
parent | d2afb3ae04e36dbc6e9eb2d8bd54406ff7b6b3bd (diff) | |
parent | 01da5fd83d6b2c5e36b77539f6cbdd8f49849225 (diff) |
Merge ../linux-2.6
Diffstat (limited to 'drivers/net/wan')
-rw-r--r-- | drivers/net/wan/c101.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/wan/c101.c b/drivers/net/wan/c101.c index 435e91ec4620..6b63b350cd52 100644 --- a/drivers/net/wan/c101.c +++ b/drivers/net/wan/c101.c | |||
@@ -118,7 +118,7 @@ static inline void openwin(card_t *card, u8 page) | |||
118 | 118 | ||
119 | static inline void set_carrier(port_t *port) | 119 | static inline void set_carrier(port_t *port) |
120 | { | 120 | { |
121 | if (!sca_in(MSCI1_OFFSET + ST3, port) & ST3_DCD) | 121 | if (!(sca_in(MSCI1_OFFSET + ST3, port) & ST3_DCD)) |
122 | netif_carrier_on(port_to_dev(port)); | 122 | netif_carrier_on(port_to_dev(port)); |
123 | else | 123 | else |
124 | netif_carrier_off(port_to_dev(port)); | 124 | netif_carrier_off(port_to_dev(port)); |
@@ -127,10 +127,10 @@ static inline void set_carrier(port_t *port) | |||
127 | 127 | ||
128 | static void sca_msci_intr(port_t *port) | 128 | static void sca_msci_intr(port_t *port) |
129 | { | 129 | { |
130 | u8 stat = sca_in(MSCI1_OFFSET + ST1, port); /* read MSCI ST1 status */ | 130 | u8 stat = sca_in(MSCI0_OFFSET + ST1, port); /* read MSCI ST1 status */ |
131 | 131 | ||
132 | /* Reset MSCI TX underrun status bit */ | 132 | /* Reset MSCI TX underrun and CDCD (ignored) status bit */ |
133 | sca_out(stat & ST1_UDRN, MSCI0_OFFSET + ST1, port); | 133 | sca_out(stat & (ST1_UDRN | ST1_CDCD), MSCI0_OFFSET + ST1, port); |
134 | 134 | ||
135 | if (stat & ST1_UDRN) { | 135 | if (stat & ST1_UDRN) { |
136 | struct net_device_stats *stats = hdlc_stats(port_to_dev(port)); | 136 | struct net_device_stats *stats = hdlc_stats(port_to_dev(port)); |
@@ -138,6 +138,7 @@ static void sca_msci_intr(port_t *port) | |||
138 | stats->tx_fifo_errors++; | 138 | stats->tx_fifo_errors++; |
139 | } | 139 | } |
140 | 140 | ||
141 | stat = sca_in(MSCI1_OFFSET + ST1, port); /* read MSCI1 ST1 status */ | ||
141 | /* Reset MSCI CDCD status bit - uses ch#2 DCD input */ | 142 | /* Reset MSCI CDCD status bit - uses ch#2 DCD input */ |
142 | sca_out(stat & ST1_CDCD, MSCI1_OFFSET + ST1, port); | 143 | sca_out(stat & ST1_CDCD, MSCI1_OFFSET + ST1, port); |
143 | 144 | ||