Lines Matching refs:sc
34 struct octeon_soft_command *sc; in octeon_alloc_soft_command_resp() local
40 sc = (struct octeon_soft_command *) in octeon_alloc_soft_command_resp()
43 if (!sc) in octeon_alloc_soft_command_resp()
47 memcpy(&sc->cmd, cmd, sizeof(union octeon_instr_64B)); in octeon_alloc_soft_command_resp()
53 ih3 = (struct octeon_instr_ih3 *)&sc->cmd.cmd3.ih3; in octeon_alloc_soft_command_resp()
54 rdp = (struct octeon_instr_rdp *)&sc->cmd.cmd3.rdp; in octeon_alloc_soft_command_resp()
55 irh = (struct octeon_instr_irh *)&sc->cmd.cmd3.irh; in octeon_alloc_soft_command_resp()
59 ih2 = (struct octeon_instr_ih2 *)&sc->cmd.cmd2.ih2; in octeon_alloc_soft_command_resp()
60 rdp = (struct octeon_instr_rdp *)&sc->cmd.cmd2.rdp; in octeon_alloc_soft_command_resp()
61 irh = (struct octeon_instr_irh *)&sc->cmd.cmd2.irh; in octeon_alloc_soft_command_resp()
71 *sc->status_word = COMPLETION_WORD_INIT; in octeon_alloc_soft_command_resp()
74 sc->cmd.cmd3.rptr = sc->dmarptr; in octeon_alloc_soft_command_resp()
76 sc->cmd.cmd2.rptr = sc->dmarptr; in octeon_alloc_soft_command_resp()
78 sc->wait_time = 1000; in octeon_alloc_soft_command_resp()
79 sc->timeout = jiffies + sc->wait_time; in octeon_alloc_soft_command_resp()
81 return sc; in octeon_alloc_soft_command_resp()
98 struct octeon_soft_command *sc = (struct octeon_soft_command *)sc_ptr; in octnet_link_ctrl_callback() local
101 nctrl = (struct octnic_ctrl_pkt *)sc->ctxptr; in octnet_link_ctrl_callback()
114 octeon_free_soft_command(oct, sc); in octnet_link_ctrl_callback()
121 struct octeon_soft_command *sc = NULL; in octnic_alloc_ctrl_pkt_sc() local
131 sc = (struct octeon_soft_command *) in octnic_alloc_ctrl_pkt_sc()
135 if (!sc) in octnic_alloc_ctrl_pkt_sc()
138 memcpy(sc->ctxptr, nctrl, sizeof(struct octnic_ctrl_pkt)); in octnic_alloc_ctrl_pkt_sc()
140 data = (u8 *)sc->virtdptr; in octnic_alloc_ctrl_pkt_sc()
151 sc->iq_no = (u32)nctrl->iq_no; in octnic_alloc_ctrl_pkt_sc()
153 octeon_prepare_soft_command(oct, sc, OPCODE_NIC, OPCODE_NIC_CMD, in octnic_alloc_ctrl_pkt_sc()
156 sc->callback = octnet_link_ctrl_callback; in octnic_alloc_ctrl_pkt_sc()
157 sc->callback_arg = sc; in octnic_alloc_ctrl_pkt_sc()
158 sc->wait_time = nctrl->wait_time; in octnic_alloc_ctrl_pkt_sc()
160 return sc; in octnic_alloc_ctrl_pkt_sc()
168 struct octeon_soft_command *sc = NULL; in octnet_send_nic_ctrl_pkt() local
183 sc = octnic_alloc_ctrl_pkt_sc(oct, nctrl); in octnet_send_nic_ctrl_pkt()
184 if (!sc) { in octnet_send_nic_ctrl_pkt()
191 retval = octeon_send_soft_command(oct, sc); in octnet_send_nic_ctrl_pkt()
193 octeon_free_soft_command(oct, sc); in octnet_send_nic_ctrl_pkt()