Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 112177
b: refs/heads/master
c: 0ca41c0
h: refs/heads/master
i:
  112175: e29454e
v: v3
  • Loading branch information
Divy Le Ray authored and David S. Miller committed Oct 8, 2008
1 parent 41f66d6 commit 4da9aa0
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 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: 822f1a57d2ad957ae16b987115251539876aef26
refs/heads/master: 0ca41c0413a4d9ca58767d53d23accea9aa1cdef
1 change: 1 addition & 0 deletions trunk/drivers/net/cxgb3/adapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ void t3_os_link_changed(struct adapter *adapter, int port_id, int link_status,

void t3_sge_start(struct adapter *adap);
void t3_sge_stop(struct adapter *adap);
void t3_stop_sge_timers(struct adapter *adap);
void t3_free_sge_resources(struct adapter *adap);
void t3_sge_err_intr_handler(struct adapter *adapter);
irq_handler_t t3_intr_handler(struct adapter *adap, int polling);
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/net/cxgb3/cxgb3_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,7 @@ static int setup_sge_qsets(struct adapter *adap)
irq_idx,
&adap->params.sge.qset[qset_idx], ntxq, dev);
if (err) {
t3_stop_sge_timers(adap);
t3_free_sge_resources(adap);
return err;
}
Expand Down Expand Up @@ -2449,6 +2450,9 @@ static pci_ers_result_t t3_io_error_detected(struct pci_dev *pdev,
test_bit(OFFLOAD_DEVMAP_BIT, &adapter->open_device_map))
offload_close(&adapter->tdev);

/* Stop SGE timers */
t3_stop_sge_timers(adapter);

adapter->flags &= ~FULL_INIT_DONE;

pci_disable_device(pdev);
Expand Down Expand Up @@ -2801,6 +2805,7 @@ static void __devexit remove_one(struct pci_dev *pdev)
if (test_bit(i, &adapter->registered_device_map))
unregister_netdev(adapter->port[i]);

t3_stop_sge_timers(adapter);
t3_free_sge_resources(adapter);
cxgb_disable_msi(adapter);

Expand Down
21 changes: 18 additions & 3 deletions trunk/drivers/net/cxgb3/sge.c
Original file line number Diff line number Diff line change
Expand Up @@ -603,9 +603,6 @@ static void t3_free_qset(struct adapter *adapter, struct sge_qset *q)
int i;
struct pci_dev *pdev = adapter->pdev;

if (q->tx_reclaim_timer.function)
del_timer_sync(&q->tx_reclaim_timer);

for (i = 0; i < SGE_RXQ_PER_SET; ++i)
if (q->fl[i].desc) {
spin_lock_irq(&adapter->sge.reg_lock);
Expand Down Expand Up @@ -3008,6 +3005,24 @@ int t3_sge_alloc_qset(struct adapter *adapter, unsigned int id, int nports,
return ret;
}

/**
* t3_stop_sge_timers - stop SGE timer call backs
* @adap: the adapter
*
* Stops each SGE queue set's timer call back
*/
void t3_stop_sge_timers(struct adapter *adap)
{
int i;

for (i = 0; i < SGE_QSETS; ++i) {
struct sge_qset *q = &adap->sge.qs[i];

if (q->tx_reclaim_timer.function)
del_timer_sync(&q->tx_reclaim_timer);
}
}

/**
* t3_free_sge_resources - free SGE resources
* @adap: the adapter
Expand Down

0 comments on commit 4da9aa0

Please sign in to comment.