Lines Matching refs:sw_cq

110 	soc_cq *sw_cq;  in soc_solicited()  local
115 sw_cq = &s->rsp[SOC_SOLICITED_RSP_Q]; in soc_solicited()
117 if (sw_cq->pool == NULL) in soc_solicited()
118 sw_cq->pool = (soc_req *) in soc_solicited()
119 (s->xram + xram_get_32low ((xram_p)&sw_cq->hw_cq->address)); in soc_solicited()
120 sw_cq->in = xram_get_8 ((xram_p)&sw_cq->hw_cq->in); in soc_solicited()
121 SOD (("soc_solicited, %d pkts arrived\n", (sw_cq->in-sw_cq->out) & sw_cq->last)) in soc_solicited()
123 hwrsp = (soc_rsp *)sw_cq->pool + sw_cq->out; in soc_solicited()
143 if (++sw_cq->out > sw_cq->last) { in soc_solicited()
144 sw_cq->seqno++; in soc_solicited()
145 sw_cq->out = 0; in soc_solicited()
148 if (sw_cq->out == sw_cq->in) { in soc_solicited()
149 sw_cq->in = xram_get_8 ((xram_p)&sw_cq->hw_cq->in); in soc_solicited()
150 if (sw_cq->out == sw_cq->in) { in soc_solicited()
152 sbus_writel((sw_cq->out << 24) | in soc_solicited()
159 sw_cq->in = xram_get_8 ((xram_p)&sw_cq->hw_cq->in); in soc_solicited()
160 if (sw_cq->out == sw_cq->in) in soc_solicited()
189 soc_cq *sw_cq; in soc_unsolicited() local
195 sw_cq = &s->rsp[SOC_UNSOLICITED_RSP_Q]; in soc_unsolicited()
196 if (sw_cq->pool == NULL) in soc_unsolicited()
197 sw_cq->pool = (soc_req *) in soc_unsolicited()
198 (s->xram + (xram_get_32low ((xram_p)&sw_cq->hw_cq->address))); in soc_unsolicited()
200 sw_cq->in = xram_get_8 ((xram_p)&sw_cq->hw_cq->in); in soc_unsolicited()
201 SOD (("soc_unsolicited, %d packets arrived\n", (sw_cq->in - sw_cq->out) & sw_cq->last)) in soc_unsolicited()
202 while (sw_cq->in != sw_cq->out) { in soc_unsolicited()
204 hwrsp = (soc_rsp *)sw_cq->pool + sw_cq->out; in soc_unsolicited()
223 in = sw_cq->in; in soc_unsolicited()
224 if (in < sw_cq->out) in += sw_cq->last + 1; in soc_unsolicited()
225 if (in < sw_cq->out + 2) { in soc_unsolicited()
227 sbus_writel((sw_cq->out << 24) | in soc_unsolicited()
234 sw_cq->in = xram_get_8 ((xram_p)&sw_cq->hw_cq->in); in soc_unsolicited()
235 in = sw_cq->in; in soc_unsolicited()
236 if (in < sw_cq->out) in soc_unsolicited()
237 in += sw_cq->last + 1; in soc_unsolicited()
238 if (in < sw_cq->out + 2) /* Nothing came, let us wait */ in soc_unsolicited()
241 if (sw_cq->out == sw_cq->last) in soc_unsolicited()
242 hwrspc = (soc_rsp *)sw_cq->pool; in soc_unsolicited()
308 if (++sw_cq->out > sw_cq->last) { in soc_unsolicited()
309 sw_cq->seqno++; in soc_unsolicited()
310 sw_cq->out = 0; in soc_unsolicited()
314 if (++sw_cq->out > sw_cq->last) { in soc_unsolicited()
315 sw_cq->seqno++; in soc_unsolicited()
316 sw_cq->out = 0; in soc_unsolicited()
320 if (sw_cq->out == sw_cq->in) { in soc_unsolicited()
321 sw_cq->in = xram_get_8 ((xram_p)&sw_cq->hw_cq->in); in soc_unsolicited()
322 if (sw_cq->out == sw_cq->in) { in soc_unsolicited()
324 sbus_writel((sw_cq->out << 24) | in soc_unsolicited()
331 sw_cq->in = xram_get_8 ((xram_p)&sw_cq->hw_cq->in); in soc_unsolicited()
360 soc_cq *sw_cq; in soc_hw_enque() local
375 sw_cq = s->req + qno; in soc_hw_enque()
376 cq_next_in = (sw_cq->in + 1) & sw_cq->last; in soc_hw_enque()
378 if (cq_next_in == sw_cq->out && in soc_hw_enque()
379 cq_next_in == (sw_cq->out = xram_get_8((xram_p)&sw_cq->hw_cq->out))) { in soc_hw_enque()
380 SOD(("%d IN %d OUT %d LAST %d\n", qno, sw_cq->in, sw_cq->out, sw_cq->last)) in soc_hw_enque()
387 request = sw_cq->pool + sw_cq->in; in soc_hw_enque()
498 request->seqno = sw_cq->seqno; in soc_hw_enque()
502 if (++sw_cq->in > sw_cq->last) { in soc_hw_enque()
503 sw_cq->in = 0; in soc_hw_enque()
504 sw_cq->seqno++; in soc_hw_enque()
508 SOC_CMD_RSP_QALL | (sw_cq->in << 24) | (SOC_CMD_REQ_Q0 << qno))) in soc_hw_enque()
510 sbus_writel(SOC_CMD_RSP_QALL | (sw_cq->in << 24) | (SOC_CMD_REQ_Q0 << qno), in soc_hw_enque()