equal
deleted
inserted
replaced
667 spin_unlock_irqrestore(&nic->cmd_lock, flags); |
667 spin_unlock_irqrestore(&nic->cmd_lock, flags); |
668 } |
668 } |
669 |
669 |
670 static void e100_disable_irq(struct nic *nic) |
670 static void e100_disable_irq(struct nic *nic) |
671 { |
671 { |
672 unsigned long flags; |
672 unsigned long flags = 0; |
673 |
673 |
674 if (nic->ecdev) |
674 if (!nic->ecdev) |
675 return; |
675 spin_lock_irqsave(&nic->cmd_lock, flags); |
676 |
|
677 spin_lock_irqsave(&nic->cmd_lock, flags); |
|
678 iowrite8(irq_mask_all, &nic->csr->scb.cmd_hi); |
676 iowrite8(irq_mask_all, &nic->csr->scb.cmd_hi); |
679 e100_write_flush(nic); |
677 e100_write_flush(nic); |
680 spin_unlock_irqrestore(&nic->cmd_lock, flags); |
678 if (!nic->ecdev) |
|
679 spin_unlock_irqrestore(&nic->cmd_lock, flags); |
681 } |
680 } |
682 |
681 |
683 static void e100_hw_reset(struct nic *nic) |
682 static void e100_hw_reset(struct nic *nic) |
684 { |
683 { |
685 /* Put CU and RU into idle with a selective reset to get |
684 /* Put CU and RU into idle with a selective reset to get |
2112 |
2111 |
2113 void e100_ec_poll(struct net_device *netdev) |
2112 void e100_ec_poll(struct net_device *netdev) |
2114 { |
2113 { |
2115 struct nic *nic = netdev_priv(netdev); |
2114 struct nic *nic = netdev_priv(netdev); |
2116 |
2115 |
2117 e100_rx_clean(nic, NULL, 100); // FIXME |
2116 e100_rx_clean(nic, NULL, 100); |
2118 e100_tx_clean(nic); |
2117 e100_tx_clean(nic); |
2119 |
2118 |
2120 if (jiffies - nic->ec_watchdog_jiffies >= 2 * HZ) { |
2119 if (jiffies - nic->ec_watchdog_jiffies >= 2 * HZ) { |
2121 e100_watchdog((unsigned long) nic); |
2120 e100_watchdog((unsigned long) nic); |
2122 nic->ec_watchdog_jiffies = jiffies; |
2121 nic->ec_watchdog_jiffies = jiffies; |
2144 |
2143 |
2145 #ifdef CONFIG_NET_POLL_CONTROLLER |
2144 #ifdef CONFIG_NET_POLL_CONTROLLER |
2146 static void e100_netpoll(struct net_device *netdev) |
2145 static void e100_netpoll(struct net_device *netdev) |
2147 { |
2146 { |
2148 struct nic *nic = netdev_priv(netdev); |
2147 struct nic *nic = netdev_priv(netdev); |
2149 |
|
2150 if (nic->ecdev) |
|
2151 return; |
|
2152 |
2148 |
2153 e100_disable_irq(nic); |
2149 e100_disable_irq(nic); |
2154 e100_intr(nic->pdev->irq, netdev); |
2150 e100_intr(nic->pdev->irq, netdev); |
2155 e100_tx_clean(nic); |
2151 e100_tx_clean(nic); |
2156 e100_enable_irq(nic); |
2152 e100_enable_irq(nic); |