Lines Matching refs:sc
50 struct octeon_soft_command *sc; in octeon_alloc_soft_command_resp() local
55 sc = (struct octeon_soft_command *) in octeon_alloc_soft_command_resp()
58 if (!sc) in octeon_alloc_soft_command_resp()
62 memcpy(&sc->cmd, cmd, sizeof(struct octeon_instr_64B)); in octeon_alloc_soft_command_resp()
67 ih = (struct octeon_instr_ih *)&sc->cmd.ih; in octeon_alloc_soft_command_resp()
70 irh = (struct octeon_instr_irh *)&sc->cmd.irh; in octeon_alloc_soft_command_resp()
74 rdp = (struct octeon_instr_rdp *)&sc->cmd.rdp; in octeon_alloc_soft_command_resp()
78 *sc->status_word = COMPLETION_WORD_INIT; in octeon_alloc_soft_command_resp()
80 sc->wait_time = 1000; in octeon_alloc_soft_command_resp()
81 sc->timeout = jiffies + sc->wait_time; in octeon_alloc_soft_command_resp()
83 return sc; in octeon_alloc_soft_command_resp()
103 struct octeon_soft_command *sc = (struct octeon_soft_command *)sc_ptr; in octnet_link_ctrl_callback() local
106 nctrl = (struct octnic_ctrl_pkt *)sc->ctxptr; in octnet_link_ctrl_callback()
117 octeon_free_soft_command(oct, sc); in octnet_link_ctrl_callback()
125 struct octeon_soft_command *sc = NULL; in octnic_alloc_ctrl_pkt_sc() local
135 sc = (struct octeon_soft_command *) in octnic_alloc_ctrl_pkt_sc()
139 if (!sc) in octnic_alloc_ctrl_pkt_sc()
142 memcpy(sc->ctxptr, nctrl, sizeof(struct octnic_ctrl_pkt)); in octnic_alloc_ctrl_pkt_sc()
144 data = (u8 *)sc->virtdptr; in octnic_alloc_ctrl_pkt_sc()
155 octeon_prepare_soft_command(oct, sc, OPCODE_NIC, OPCODE_NIC_CMD, in octnic_alloc_ctrl_pkt_sc()
158 sc->callback = octnet_link_ctrl_callback; in octnic_alloc_ctrl_pkt_sc()
159 sc->callback_arg = sc; in octnic_alloc_ctrl_pkt_sc()
160 sc->wait_time = nctrl->wait_time; in octnic_alloc_ctrl_pkt_sc()
162 return sc; in octnic_alloc_ctrl_pkt_sc()
171 struct octeon_soft_command *sc = NULL; in octnet_send_nic_ctrl_pkt() local
173 sc = octnic_alloc_ctrl_pkt_sc(oct, nctrl, nparams); in octnet_send_nic_ctrl_pkt()
174 if (!sc) { in octnet_send_nic_ctrl_pkt()
180 retval = octeon_send_soft_command(oct, sc); in octnet_send_nic_ctrl_pkt()
182 octeon_free_soft_command(oct, sc); in octnet_send_nic_ctrl_pkt()