Lines Matching defs:sc
34 struct octeon_soft_command *sc;
40 sc = (struct octeon_soft_command *)
43 if (!sc)
47 memcpy(&sc->cmd, cmd, sizeof(union octeon_instr_64B));
53 ih3 = (struct octeon_instr_ih3 *)&sc->cmd.cmd3.ih3;
54 rdp = (struct octeon_instr_rdp *)&sc->cmd.cmd3.rdp;
55 irh = (struct octeon_instr_irh *)&sc->cmd.cmd3.irh;
59 ih2 = (struct octeon_instr_ih2 *)&sc->cmd.cmd2.ih2;
60 rdp = (struct octeon_instr_rdp *)&sc->cmd.cmd2.rdp;
61 irh = (struct octeon_instr_irh *)&sc->cmd.cmd2.irh;
71 *sc->status_word = COMPLETION_WORD_INIT;
74 sc->cmd.cmd3.rptr = sc->dmarptr;
76 sc->cmd.cmd2.rptr = sc->dmarptr;
78 sc->expiry_time = jiffies + msecs_to_jiffies(LIO_SC_MAX_TMO_MS);
80 return sc;
100 struct octeon_soft_command *sc = NULL;
110 sc = (struct octeon_soft_command *)
113 if (!sc)
116 data = (u8 *)sc->virtdptr;
127 sc->iq_no = (u32)nctrl->iq_no;
129 octeon_prepare_soft_command(oct, sc, OPCODE_NIC, OPCODE_NIC_CMD,
132 init_completion(&sc->complete);
133 sc->sc_status = OCTEON_REQUEST_PENDING;
135 return sc;
143 struct octeon_soft_command *sc = NULL;
158 sc = octnic_alloc_ctrl_pkt_sc(oct, nctrl);
159 if (!sc) {
166 retval = octeon_send_soft_command(oct, sc);
168 octeon_free_soft_command(oct, sc);
183 WRITE_ONCE(sc->caller_is_done, true);
188 retval = wait_for_sc_completion_timeout(oct, sc, 0);
192 nctrl->sc_status = sc->sc_status;
197 WRITE_ONCE(sc->caller_is_done, true);