devices/e1000/e1000_main-2.6.26-ethercat.c
branchstable-1.5
changeset 2421 bc2d4bf9cbe5
parent 2050 a3e59f2a8589
child 2469 634ba3b1eb95
equal deleted inserted replaced
2420:69056c46aa4d 2421:bc2d4bf9cbe5
   670 	}
   670 	}
   671 
   671 
   672 	netdev->tx_queue_len = adapter->tx_queue_len;
   672 	netdev->tx_queue_len = adapter->tx_queue_len;
   673 	adapter->link_speed = 0;
   673 	adapter->link_speed = 0;
   674 	adapter->link_duplex = 0;
   674 	adapter->link_duplex = 0;
   675 	
   675 
   676 	if (!adapter->ecdev) {
   676 	if (!adapter->ecdev) {
   677 		netif_carrier_off(netdev);
   677 		netif_carrier_off(netdev);
   678 		netif_stop_queue(netdev);
   678 		netif_stop_queue(netdev);
   679 	}
   679 	}
   680 
   680 
  2465 
  2465 
  2466 	if (!adapter->netdev && netif_running(netdev)) {
  2466 	if (!adapter->netdev && netif_running(netdev)) {
  2467 		/* No need to loop, because 82542 supports only 1 queue */
  2467 		/* No need to loop, because 82542 supports only 1 queue */
  2468 		struct e1000_rx_ring *ring = &adapter->rx_ring[0];
  2468 		struct e1000_rx_ring *ring = &adapter->rx_ring[0];
  2469 		e1000_configure_rx(adapter);
  2469 		e1000_configure_rx(adapter);
  2470 		if (adapter->ecdev) { 
  2470 		if (adapter->ecdev) {
  2471 			/* fill rx ring completely! */
  2471 			/* fill rx ring completely! */
  2472 			adapter->alloc_rx_buf(adapter, ring, ring->count);
  2472 			adapter->alloc_rx_buf(adapter, ring, ring->count);
  2473 		} else {
  2473 		} else {
  2474             /* this one leaves the last ring element unallocated! */
  2474             /* this one leaves the last ring element unallocated! */
  2475 			adapter->alloc_rx_buf(adapter, ring, E1000_DESC_UNUSED(ring));
  2475 			adapter->alloc_rx_buf(adapter, ring, E1000_DESC_UNUSED(ring));
  3922 e1000_intr_msi(int irq, void *data)
  3922 e1000_intr_msi(int irq, void *data)
  3923 {
  3923 {
  3924 	struct net_device *netdev = data;
  3924 	struct net_device *netdev = data;
  3925 	struct e1000_adapter *adapter = netdev_priv(netdev);
  3925 	struct e1000_adapter *adapter = netdev_priv(netdev);
  3926 	struct e1000_hw *hw = &adapter->hw;
  3926 	struct e1000_hw *hw = &adapter->hw;
  3927 	
  3927 
  3928 	int i;
  3928 	int i;
  3929 
  3929 
  3930 	if (adapter->ecdev) {
  3930 	if (adapter->ecdev) {
  3931 #ifdef CONFIG_E1000_NAPI
  3931 #ifdef CONFIG_E1000_NAPI
  3932 		int ec_work_done = 0;
  3932 		int ec_work_done = 0;
  4101 		if (hw->mac_type == e1000_82547 || hw->mac_type == e1000_82547_rev_2)
  4101 		if (hw->mac_type == e1000_82547 || hw->mac_type == e1000_82547_rev_2)
  4102 			e1000_irq_enable(adapter);
  4102 			e1000_irq_enable(adapter);
  4103 
  4103 
  4104 #endif
  4104 #endif
  4105 	}
  4105 	}
  4106 	
  4106 
  4107 	return IRQ_HANDLED;
  4107 	return IRQ_HANDLED;
  4108 }
  4108 }
  4109 
  4109 
  4110 #ifdef CONFIG_E1000_NAPI
  4110 #ifdef CONFIG_E1000_NAPI
  4111 /**
  4111 /**