equal
deleted
inserted
replaced
657 spin_unlock_irqrestore(&nic->cmd_lock, flags); |
657 spin_unlock_irqrestore(&nic->cmd_lock, flags); |
658 } |
658 } |
659 |
659 |
660 static void e100_disable_irq(struct nic *nic) |
660 static void e100_disable_irq(struct nic *nic) |
661 { |
661 { |
662 unsigned long flags; |
662 unsigned long flags = 0; |
663 |
663 |
664 if (nic->ecdev) |
664 if (!nic->ecdev) |
665 return; |
665 spin_lock_irqsave(&nic->cmd_lock, flags); |
666 |
|
667 spin_lock_irqsave(&nic->cmd_lock, flags); |
|
668 writeb(irq_mask_all, &nic->csr->scb.cmd_hi); |
666 writeb(irq_mask_all, &nic->csr->scb.cmd_hi); |
669 e100_write_flush(nic); |
667 e100_write_flush(nic); |
670 spin_unlock_irqrestore(&nic->cmd_lock, flags); |
668 if (!nic->ecdev) |
|
669 spin_unlock_irqrestore(&nic->cmd_lock, flags); |
671 } |
670 } |
672 |
671 |
673 static void e100_hw_reset(struct nic *nic) |
672 static void e100_hw_reset(struct nic *nic) |
674 { |
673 { |
675 /* Put CU and RU into idle with a selective reset to get |
674 /* Put CU and RU into idle with a selective reset to get |
2093 |
2092 |
2094 void e100_ec_poll(struct net_device *netdev) |
2093 void e100_ec_poll(struct net_device *netdev) |
2095 { |
2094 { |
2096 struct nic *nic = netdev_priv(netdev); |
2095 struct nic *nic = netdev_priv(netdev); |
2097 |
2096 |
2098 e100_rx_clean(nic, NULL, 100); // FIXME |
2097 e100_rx_clean(nic, NULL, 100); |
2099 e100_tx_clean(nic); |
2098 e100_tx_clean(nic); |
2100 |
2099 |
2101 if (jiffies - nic->ec_watchdog_jiffies >= 2 * HZ) { |
2100 if (jiffies - nic->ec_watchdog_jiffies >= 2 * HZ) { |
2102 e100_watchdog((unsigned long) nic); |
2101 e100_watchdog((unsigned long) nic); |
2103 nic->ec_watchdog_jiffies = jiffies; |
2102 nic->ec_watchdog_jiffies = jiffies; |
2129 |
2128 |
2130 #ifdef CONFIG_NET_POLL_CONTROLLER |
2129 #ifdef CONFIG_NET_POLL_CONTROLLER |
2131 static void e100_netpoll(struct net_device *netdev) |
2130 static void e100_netpoll(struct net_device *netdev) |
2132 { |
2131 { |
2133 struct nic *nic = netdev_priv(netdev); |
2132 struct nic *nic = netdev_priv(netdev); |
2134 |
|
2135 if (nic->ecdev) |
|
2136 return; |
|
2137 |
2133 |
2138 e100_disable_irq(nic); |
2134 e100_disable_irq(nic); |
2139 e100_intr(nic->pdev->irq, netdev); |
2135 e100_intr(nic->pdev->irq, netdev); |
2140 e100_tx_clean(nic); |
2136 e100_tx_clean(nic); |
2141 e100_enable_irq(nic); |
2137 e100_enable_irq(nic); |