equal
deleted
inserted
replaced
675 spin_unlock_irqrestore(&nic->cmd_lock, flags); |
675 spin_unlock_irqrestore(&nic->cmd_lock, flags); |
676 } |
676 } |
677 |
677 |
678 static void e100_disable_irq(struct nic *nic) |
678 static void e100_disable_irq(struct nic *nic) |
679 { |
679 { |
680 unsigned long flags; |
680 unsigned long flags = 0; |
681 |
681 |
682 if (nic->ecdev) |
682 if (!nic->ecdev) |
683 return; |
683 spin_lock_irqsave(&nic->cmd_lock, flags); |
684 |
|
685 spin_lock_irqsave(&nic->cmd_lock, flags); |
|
686 iowrite8(irq_mask_all, &nic->csr->scb.cmd_hi); |
684 iowrite8(irq_mask_all, &nic->csr->scb.cmd_hi); |
687 e100_write_flush(nic); |
685 e100_write_flush(nic); |
688 spin_unlock_irqrestore(&nic->cmd_lock, flags); |
686 if (!nic->ecdev) |
|
687 spin_unlock_irqrestore(&nic->cmd_lock, flags); |
689 } |
688 } |
690 |
689 |
691 static void e100_hw_reset(struct nic *nic) |
690 static void e100_hw_reset(struct nic *nic) |
692 { |
691 { |
693 /* Put CU and RU into idle with a selective reset to get |
692 /* Put CU and RU into idle with a selective reset to get |
2183 |
2182 |
2184 void e100_ec_poll(struct net_device *netdev) |
2183 void e100_ec_poll(struct net_device *netdev) |
2185 { |
2184 { |
2186 struct nic *nic = netdev_priv(netdev); |
2185 struct nic *nic = netdev_priv(netdev); |
2187 |
2186 |
2188 e100_rx_clean(nic, NULL, 100); // FIXME |
2187 e100_rx_clean(nic, NULL, 100); |
2189 e100_tx_clean(nic); |
2188 e100_tx_clean(nic); |
2190 |
2189 |
2191 if (jiffies - nic->ec_watchdog_jiffies >= 2 * HZ) { |
2190 if (jiffies - nic->ec_watchdog_jiffies >= 2 * HZ) { |
2192 e100_watchdog((unsigned long) nic); |
2191 e100_watchdog((unsigned long) nic); |
2193 nic->ec_watchdog_jiffies = jiffies; |
2192 nic->ec_watchdog_jiffies = jiffies; |
2215 |
2214 |
2216 #ifdef CONFIG_NET_POLL_CONTROLLER |
2215 #ifdef CONFIG_NET_POLL_CONTROLLER |
2217 static void e100_netpoll(struct net_device *netdev) |
2216 static void e100_netpoll(struct net_device *netdev) |
2218 { |
2217 { |
2219 struct nic *nic = netdev_priv(netdev); |
2218 struct nic *nic = netdev_priv(netdev); |
2220 |
|
2221 if (nic->ecdev) |
|
2222 return; |
|
2223 |
2219 |
2224 e100_disable_irq(nic); |
2220 e100_disable_irq(nic); |
2225 e100_intr(nic->pdev->irq, netdev); |
2221 e100_intr(nic->pdev->irq, netdev); |
2226 e100_tx_clean(nic); |
2222 e100_tx_clean(nic); |
2227 e100_enable_irq(nic); |
2223 e100_enable_irq(nic); |