Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 33519
b: refs/heads/master
c: a76b044
h: refs/heads/master
i:
  33517: 763f997
  33515: 1914038
  33511: 6886bbe
  33503: 7f8ca0b
v: v3
  • Loading branch information
Krzysztof Halasa authored and Jeff Garzik committed Aug 19, 2006
1 parent 299ebe7 commit c897025
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2ca2d5e84c19ddbc0126087af6288533a05f1799
refs/heads/master: a76b044af147135b5fb7570aba35d4908f143cc9
9 changes: 5 additions & 4 deletions trunk/drivers/net/wan/c101.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static inline void openwin(card_t *card, u8 page)

static inline void set_carrier(port_t *port)
{
if (!sca_in(MSCI1_OFFSET + ST3, port) & ST3_DCD)
if (!(sca_in(MSCI1_OFFSET + ST3, port) & ST3_DCD))
netif_carrier_on(port_to_dev(port));
else
netif_carrier_off(port_to_dev(port));
Expand All @@ -127,17 +127,18 @@ static inline void set_carrier(port_t *port)

static void sca_msci_intr(port_t *port)
{
u8 stat = sca_in(MSCI1_OFFSET + ST1, port); /* read MSCI ST1 status */
u8 stat = sca_in(MSCI0_OFFSET + ST1, port); /* read MSCI ST1 status */

/* Reset MSCI TX underrun status bit */
sca_out(stat & ST1_UDRN, MSCI0_OFFSET + ST1, port);
/* Reset MSCI TX underrun and CDCD (ignored) status bit */
sca_out(stat & (ST1_UDRN | ST1_CDCD), MSCI0_OFFSET + ST1, port);

if (stat & ST1_UDRN) {
struct net_device_stats *stats = hdlc_stats(port_to_dev(port));
stats->tx_errors++; /* TX Underrun error detected */
stats->tx_fifo_errors++;
}

stat = sca_in(MSCI1_OFFSET + ST1, port); /* read MSCI1 ST1 status */
/* Reset MSCI CDCD status bit - uses ch#2 DCD input */
sca_out(stat & ST1_CDCD, MSCI1_OFFSET + ST1, port);

Expand Down

0 comments on commit c897025

Please sign in to comment.