diff options
author | David S. Miller <davem@davemloft.net> | 2008-01-07 23:48:21 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-09 02:30:09 -0500 |
commit | 4ec2411980d0fd2995e8dea8a06fe57aa47523cb (patch) | |
tree | a4013547ff1bda8fc038623290debd62ad6dd7fe /drivers/net/qla3xxx.c | |
parent | a0a46196cd98af5cc015842bba757571f02a8c30 (diff) |
[NET]: Do not check netif_running() and carrier state in ->poll()
Drivers do this to try to break out of the ->poll()'ing loop
when the device is being brought administratively down.
Now that we have a napi_disable() "pending" state we are going
to solve that problem generically.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qla3xxx.c')
-rw-r--r-- | drivers/net/qla3xxx.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c index a5791114b7bd..cf0774de6c41 100644 --- a/drivers/net/qla3xxx.c +++ b/drivers/net/qla3xxx.c | |||
@@ -2320,14 +2320,9 @@ static int ql_poll(struct napi_struct *napi, int budget) | |||
2320 | unsigned long hw_flags; | 2320 | unsigned long hw_flags; |
2321 | struct ql3xxx_port_registers __iomem *port_regs = qdev->mem_map_registers; | 2321 | struct ql3xxx_port_registers __iomem *port_regs = qdev->mem_map_registers; |
2322 | 2322 | ||
2323 | if (!netif_carrier_ok(ndev)) | ||
2324 | goto quit_polling; | ||
2325 | |||
2326 | ql_tx_rx_clean(qdev, &tx_cleaned, &rx_cleaned, budget); | 2323 | ql_tx_rx_clean(qdev, &tx_cleaned, &rx_cleaned, budget); |
2327 | 2324 | ||
2328 | if (tx_cleaned + rx_cleaned != budget || | 2325 | if (tx_cleaned + rx_cleaned != budget) { |
2329 | !netif_running(ndev)) { | ||
2330 | quit_polling: | ||
2331 | spin_lock_irqsave(&qdev->hw_lock, hw_flags); | 2326 | spin_lock_irqsave(&qdev->hw_lock, hw_flags); |
2332 | __netif_rx_complete(ndev, napi); | 2327 | __netif_rx_complete(ndev, napi); |
2333 | ql_update_small_bufq_prod_index(qdev); | 2328 | ql_update_small_bufq_prod_index(qdev); |