Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 218455
b: refs/heads/master
c: f203af7
h: refs/heads/master
i:
  218453: 6ad2052
  218451: 724a6f3
  218447: 92ff7fa
v: v3
  • Loading branch information
Somnath Kotur authored and David S. Miller committed Oct 27, 2010
1 parent a3e960b commit a93b935
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 853dc2e03ddd0c49885ed55c48755d2b1073122a
refs/heads/master: f203af7088cad0845ee128bb736bd372158c3e22
22 changes: 18 additions & 4 deletions trunk/drivers/net/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1802,6 +1802,20 @@ static void be_worker(struct work_struct *work)
struct be_rx_obj *rxo;
int i;

/* when interrupts are not yet enabled, just reap any pending
* mcc completions */
if (!netif_running(adapter->netdev)) {
int mcc_compl, status = 0;

mcc_compl = be_process_mcc(adapter, &status);

if (mcc_compl) {
struct be_mcc_obj *mcc_obj = &adapter->mcc_obj;
be_cq_notify(adapter, mcc_obj->cq.id, false, mcc_compl);
}
goto reschedule;
}

if (!adapter->stats_ioctl_sent)
be_cmd_get_stats(adapter, &adapter->stats_cmd);

Expand All @@ -1820,6 +1834,7 @@ static void be_worker(struct work_struct *work)
if (!adapter->ue_detected)
be_detect_dump_ue(adapter);

reschedule:
schedule_delayed_work(&adapter->work, msecs_to_jiffies(1000));
}

Expand Down Expand Up @@ -2015,8 +2030,6 @@ static int be_close(struct net_device *netdev)
struct be_eq_obj *tx_eq = &adapter->tx_eq;
int vec, i;

cancel_delayed_work_sync(&adapter->work);

be_async_mcc_disable(adapter);

netif_stop_queue(netdev);
Expand Down Expand Up @@ -2081,8 +2094,6 @@ static int be_open(struct net_device *netdev)
/* Now that interrupts are on we can process async mcc */
be_async_mcc_enable(adapter);

schedule_delayed_work(&adapter->work, msecs_to_jiffies(100));

status = be_cmd_link_status_query(adapter, &link_up, &mac_speed,
&link_speed);
if (status)
Expand Down Expand Up @@ -2707,6 +2718,8 @@ static void __devexit be_remove(struct pci_dev *pdev)
if (!adapter)
return;

cancel_delayed_work_sync(&adapter->work);

unregister_netdev(adapter->netdev);

be_clear(adapter);
Expand Down Expand Up @@ -2863,6 +2876,7 @@ static int __devinit be_probe(struct pci_dev *pdev,
netif_carrier_off(netdev);

dev_info(&pdev->dev, "%s port %d\n", nic_name(pdev), adapter->port_num);
schedule_delayed_work(&adapter->work, msecs_to_jiffies(100));
return 0;

unsetup:
Expand Down

0 comments on commit a93b935

Please sign in to comment.