equal
deleted
inserted
replaced
21 |
21 |
22 Contact Information: |
22 Contact Information: |
23 Linux NICS <linux.nics@intel.com> |
23 Linux NICS <linux.nics@intel.com> |
24 e1000-devel Mailing List <e1000-devel@lists.sourceforge.net> |
24 e1000-devel Mailing List <e1000-devel@lists.sourceforge.net> |
25 Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 |
25 Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 |
|
26 |
|
27 vim: noexpandtab |
26 |
28 |
27 *******************************************************************************/ |
29 *******************************************************************************/ |
28 |
30 |
29 #include <linux/module.h> |
31 #include <linux/module.h> |
30 #include <linux/types.h> |
32 #include <linux/types.h> |
1185 struct net_device *netdev = data; |
1187 struct net_device *netdev = data; |
1186 struct e1000_adapter *adapter = netdev_priv(netdev); |
1188 struct e1000_adapter *adapter = netdev_priv(netdev); |
1187 struct e1000_hw *hw = &adapter->hw; |
1189 struct e1000_hw *hw = &adapter->hw; |
1188 u32 icr = er32(ICR); |
1190 u32 icr = er32(ICR); |
1189 |
1191 |
1190 if (adapter->ecdev) { |
1192 if (adapter->ecdev) { |
1191 int ec_work_done = 0; |
1193 int ec_work_done = 0; |
1192 adapter->clean_rx(adapter, &ec_work_done, 100); |
1194 adapter->clean_rx(adapter, &ec_work_done, 100); |
1193 e1000_clean_tx_irq(adapter); |
1195 e1000_clean_tx_irq(adapter); |
1194 return IRQ_HANDLED; |
1196 return IRQ_HANDLED; |
1195 } |
1197 } |
1196 /* |
1198 /* |
1197 * read ICR disables interrupts using IAM |
1199 * read ICR disables interrupts using IAM |
1198 */ |
1200 */ |
1289 /* guard against interrupt when we're going down */ |
1291 /* guard against interrupt when we're going down */ |
1290 if (!test_bit(__E1000_DOWN, &adapter->state)) |
1292 if (!test_bit(__E1000_DOWN, &adapter->state)) |
1291 mod_timer(&adapter->watchdog_timer, jiffies + 1); |
1293 mod_timer(&adapter->watchdog_timer, jiffies + 1); |
1292 } |
1294 } |
1293 |
1295 |
1294 if (adapter->ecdev) { |
1296 if (adapter->ecdev) { |
1295 int ec_work_done = 0; |
1297 int ec_work_done = 0; |
1296 adapter->clean_rx(adapter, &ec_work_done, 100); |
1298 adapter->clean_rx(adapter, &ec_work_done, 100); |
1297 e1000_clean_tx_irq(adapter); |
1299 e1000_clean_tx_irq(adapter); |
1298 return IRQ_HANDLED; |
1300 return IRQ_HANDLED; |
1299 } |
1301 } |
1300 |
1302 |
1301 if (napi_schedule_prep(&adapter->napi)) { |
1303 if (napi_schedule_prep(&adapter->napi)) { |
1302 adapter->total_tx_bytes = 0; |
1304 adapter->total_tx_bytes = 0; |
1372 writel(1000000000 / (adapter->rx_ring->itr_val * 256), |
1374 writel(1000000000 / (adapter->rx_ring->itr_val * 256), |
1373 adapter->hw.hw_addr + adapter->rx_ring->itr_register); |
1375 adapter->hw.hw_addr + adapter->rx_ring->itr_register); |
1374 adapter->rx_ring->set_itr = 0; |
1376 adapter->rx_ring->set_itr = 0; |
1375 } |
1377 } |
1376 |
1378 |
1377 if (adapter->ecdev) { |
1379 if (adapter->ecdev) { |
1378 int ec_work_done = 0; |
1380 int ec_work_done = 0; |
1379 adapter->clean_rx(adapter, &ec_work_done, 100); |
1381 adapter->clean_rx(adapter, &ec_work_done, 100); |
1380 } else { |
1382 } else { |
1381 if (napi_schedule_prep(&adapter->napi)) { |
1383 if (napi_schedule_prep(&adapter->napi)) { |
1382 adapter->total_rx_bytes = 0; |
1384 adapter->total_rx_bytes = 0; |
1383 adapter->total_rx_packets = 0; |
1385 adapter->total_rx_packets = 0; |
1384 __napi_schedule(&adapter->napi); |
1386 __napi_schedule(&adapter->napi); |
3215 } |
3217 } |
3216 |
3218 |
3217 /* From here on the code is the same as e1000e_up() */ |
3219 /* From here on the code is the same as e1000e_up() */ |
3218 clear_bit(__E1000_DOWN, &adapter->state); |
3220 clear_bit(__E1000_DOWN, &adapter->state); |
3219 |
3221 |
3220 napi_enable(&adapter->napi); |
3222 if (!adapter->ecdev) { |
3221 |
3223 napi_enable(&adapter->napi); |
3222 e1000_irq_enable(adapter); |
3224 |
3223 |
3225 e1000_irq_enable(adapter); |
3224 netif_start_queue(netdev); |
3226 |
|
3227 netif_start_queue(netdev); |
|
3228 } |
3225 |
3229 |
3226 /* fire a link status change interrupt to start the watchdog */ |
3230 /* fire a link status change interrupt to start the watchdog */ |
3227 ew32(ICS, E1000_ICS_LSC); |
3231 ew32(ICS, E1000_ICS_LSC); |
3228 |
3232 |
3229 return 0; |
3233 return 0; |