Lines Matching defs:trc
32 struct snic_trc *trc = &snic_glob->trc;
36 spin_lock_irqsave(&trc->lock, flags);
37 td = &trc->buf[trc->wr_idx];
38 trc->wr_idx++;
40 if (trc->wr_idx == trc->max_idx)
41 trc->wr_idx = 0;
43 if (trc->wr_idx != trc->rd_idx) {
44 spin_unlock_irqrestore(&trc->lock, flags);
49 trc->rd_idx++;
50 if (trc->rd_idx == trc->max_idx)
51 trc->rd_idx = 0;
54 spin_unlock_irqrestore(&trc->lock, flags);
92 struct snic_trc *trc = &snic_glob->trc;
95 spin_lock_irqsave(&trc->lock, flags);
96 if (trc->rd_idx == trc->wr_idx) {
97 spin_unlock_irqrestore(&trc->lock, flags);
101 td = &trc->buf[trc->rd_idx];
105 spin_unlock_irqrestore(&trc->lock, flags);
110 trc->rd_idx++;
111 if (trc->rd_idx == trc->max_idx)
112 trc->rd_idx = 0;
113 spin_unlock_irqrestore(&trc->lock, flags);
124 struct snic_trc *trc = &snic_glob->trc;
138 trc->buf = (struct snic_trc_data *) tbuf;
139 spin_lock_init(&trc->lock);
143 trc->max_idx = (tbuf_sz / SNIC_TRC_ENTRY_SZ);
144 trc->rd_idx = trc->wr_idx = 0;
145 trc->enable = true;
159 struct snic_trc *trc = &snic_glob->trc;
161 trc->enable = false;
164 if (trc->buf) {
165 vfree(trc->buf);
166 trc->buf = NULL;