1633 cmd.speed == SPEED_100 ? "100" : "10", |
1633 cmd.speed == SPEED_100 ? "100" : "10", |
1634 cmd.duplex == DUPLEX_FULL ? "full" : "half"); |
1634 cmd.duplex == DUPLEX_FULL ? "full" : "half"); |
1635 } else if(!mii_link_ok(&nic->mii) && netif_carrier_ok(nic->netdev)) { |
1635 } else if(!mii_link_ok(&nic->mii) && netif_carrier_ok(nic->netdev)) { |
1636 DPRINTK(LINK, INFO, "link down\n"); |
1636 DPRINTK(LINK, INFO, "link down\n"); |
1637 } |
1637 } |
1638 } |
1638 |
1639 |
1639 mii_check_link(&nic->mii); |
1640 mii_check_link(&nic->mii); |
1640 } |
1641 |
1641 |
1642 if (!nic->ecdev) { |
1642 if (!nic->ecdev) { |
1643 /* Software generated interrupt to recover from (rare) Rx |
1643 /* Software generated interrupt to recover from (rare) Rx |
1644 * allocation failure. |
1644 * allocation failure. |
1645 * Unfortunately have to use a spinlock to not re-enable interrupts |
1645 * Unfortunately have to use a spinlock to not re-enable interrupts |
1647 * interrupt mask bit and the SW Interrupt generation bit */ |
1647 * interrupt mask bit and the SW Interrupt generation bit */ |
1648 spin_lock_irq(&nic->cmd_lock); |
1648 spin_lock_irq(&nic->cmd_lock); |
1649 writeb(readb(&nic->csr->scb.cmd_hi) | irq_sw_gen,&nic->csr->scb.cmd_hi); |
1649 writeb(readb(&nic->csr->scb.cmd_hi) | irq_sw_gen,&nic->csr->scb.cmd_hi); |
1650 e100_write_flush(nic); |
1650 e100_write_flush(nic); |
1651 spin_unlock_irq(&nic->cmd_lock); |
1651 spin_unlock_irq(&nic->cmd_lock); |
1652 } |
1652 |
1653 |
1653 e100_update_stats(nic); |
1654 e100_update_stats(nic); |
1654 e100_adjust_adaptive_ifs(nic, cmd.speed, cmd.duplex); |
1655 e100_adjust_adaptive_ifs(nic, cmd.speed, cmd.duplex); |
1655 |
1656 |
1656 if(nic->mac <= mac_82557_D100_C) |
1657 if(nic->mac <= mac_82557_D100_C) |
1657 /* Issue a multicast command to workaround a 557 lock up */ |
1658 /* Issue a multicast command to workaround a 557 lock up */ |
1658 e100_set_multicast_list(nic->netdev); |
1659 e100_set_multicast_list(nic->netdev); |
1659 |
1660 |
1660 if(nic->flags & ich && cmd.speed==SPEED_10 && cmd.duplex==DUPLEX_HALF) |
1661 if(nic->flags & ich && cmd.speed==SPEED_10 && cmd.duplex==DUPLEX_HALF) |
1661 /* Need SW workaround for ICH[x] 10Mbps/half duplex Tx hang. */ |
1662 /* Need SW workaround for ICH[x] 10Mbps/half duplex Tx hang. */ |
1662 nic->flags |= ich_10h_workaround; |
1663 nic->flags |= ich_10h_workaround; |
1663 else |
1664 else |
1664 nic->flags &= ~ich_10h_workaround; |
1665 nic->flags &= ~ich_10h_workaround; |
1665 |
1666 |
|
1667 if (!nic->ecdev) |
|
1668 mod_timer(&nic->watchdog, jiffies + E100_WATCHDOG_PERIOD); |
1666 mod_timer(&nic->watchdog, jiffies + E100_WATCHDOG_PERIOD); |
|
1667 } |
1669 } |
1668 } |
1670 |
1669 |
1671 static void e100_xmit_prepare(struct nic *nic, struct cb *cb, |
1670 static void e100_xmit_prepare(struct nic *nic, struct cb *cb, |
1672 struct sk_buff *skb) |
1671 struct sk_buff *skb) |
1673 { |
1672 { |