Deleted Added
full compact
31c31
< __FBSDID("$FreeBSD: head/sys/dev/cxgb/cxgb_sge.c 170789 2007-06-15 20:02:02Z kmacy $");
---
> __FBSDID("$FreeBSD: head/sys/dev/cxgb/cxgb_sge.c 170869 2007-06-17 04:33:38Z kmacy $");
689c689,690
< callout_reset(&sc->sge_timer_ch, TX_RECLAIM_PERIOD, sge_timer_cb, sc);
---
> if (sc->open_device_map != 0)
> callout_reset(&sc->sge_timer_ch, TX_RECLAIM_PERIOD, sge_timer_cb, sc);
1470c1471
< for (i = 0; i < SGE_TXQ_PER_SET; ++i) {
---
> for (i = 0; i < SGE_TXQ_PER_SET; i++) {
1480a1482
> MTX_DESTROY(&q->txq[i].lock);
1485,1487d1486
< if (mtx_initialized(&q->txq[i].lock)) {
< mtx_destroy(&q->txq[i].lock);
< }
1498a1498
> MTX_DESTROY(&q->rspq.lock);
1501,1503d1500
< if (mtx_initialized(&q->rspq.lock))
< mtx_destroy(&q->rspq.lock);
<
1516c1513
< int i;
---
> int i, nqsets;
1518c1515,1518
< for (i = 0; i < SGE_QSETS; ++i)
---
> for (nqsets = i = 0; i < (sc)->params.nports; i++)
> nqsets += sc->port[i].nqsets;
>
> for (i = 0; i < nqsets; ++i)
1551c1551,1552
< int i;
---
> int i, nqsets;
>
1557c1558,1561
< for (i = 0; i < SGE_QSETS; ++i) {
---
> for (nqsets = i = 0; i < (sc)->params.nports; i++)
> nqsets += sc->port[i].nqsets;
>
> for (i = 0; i < nqsets; ++i) {
2013c2017,2019
< mtx_init(&q->txq[i].lock, "t3 txq lock", NULL, MTX_DEF);
---
> snprintf(q->txq[i].lockbuf, TXQ_NAME_LEN, "t3 txq lock %d:%d:%d",
> device_get_unit(sc->dev), irq_vec_idx, i);
> MTX_INIT(&q->txq[i].lock, q->txq[i].lockbuf, NULL, MTX_DEF);
2025,2026c2031
< mtx_init(&q->rspq.lock, "t3 rspq lock", NULL, MTX_DEF);
<
---
>
2090a2096,2099
> snprintf(q->rspq.lockbuf, RSPQ_NAME_LEN, "t3 rspq lock %d:%d",
> device_get_unit(sc->dev), irq_vec_idx);
> MTX_INIT(&q->rspq.lock, q->rspq.lockbuf, NULL, MTX_DEF);
>