Lines Matching refs:asyreq
207 struct fw_asyreq *asyreq; in read_write_quad() local
210 asyreq = malloc(sizeof(*asyreq)); in read_write_quad()
211 if (asyreq == NULL) in read_write_quad()
213 asyreq->req.len = 16; in read_write_quad()
215 asyreq->req.type = FWASREQNODE; in read_write_quad()
216 asyreq->pkt.mode.rreqq.dst = FWLOCALBUS | node; in read_write_quad()
218 asyreq->req.type = FWASREQEUI; in read_write_quad()
219 asyreq->req.dst.eui = eui; in read_write_quad()
221 asyreq->pkt.mode.rreqq.tlrt = 0; in read_write_quad()
223 asyreq->pkt.mode.rreqq.tcode = FWTCODE_RREQQ; in read_write_quad()
225 asyreq->pkt.mode.rreqq.tcode = FWTCODE_WREQQ; in read_write_quad()
227 asyreq->pkt.mode.rreqq.dest_hi = 0xffff; in read_write_quad()
228 asyreq->pkt.mode.rreqq.dest_lo = addr_lo; in read_write_quad()
230 qld = (u_int32_t *)&asyreq->pkt; in read_write_quad()
232 asyreq->pkt.mode.wreqq.data = htonl(data); in read_write_quad()
234 if (ioctl(fd, FW_ASYREQ, asyreq) < 0) { in read_write_quad()
238 free(asyreq); in read_write_quad()
263 struct fw_asyreq *asyreq; in send_phy_config() local
265 asyreq = malloc(sizeof(*asyreq)); in send_phy_config()
266 if (asyreq == NULL) in send_phy_config()
268 asyreq->req.len = 12; in send_phy_config()
269 asyreq->req.type = FWASREQNODE; in send_phy_config()
270 asyreq->pkt.mode.ld[0] = 0; in send_phy_config()
271 asyreq->pkt.mode.ld[1] = 0; in send_phy_config()
272 asyreq->pkt.mode.common.tcode = FWTCODE_PHY; in send_phy_config()
274 asyreq->pkt.mode.ld[1] |= ((root_node << 24) | (1 << 23)); in send_phy_config()
276 asyreq->pkt.mode.ld[1] |= ((1 << 22) | (gap_count << 16)); in send_phy_config()
277 asyreq->pkt.mode.ld[2] = ~asyreq->pkt.mode.ld[1]; in send_phy_config()
282 if (ioctl(fd, FW_ASYREQ, asyreq) < 0) in send_phy_config()
284 free(asyreq); in send_phy_config()
290 struct fw_asyreq *asyreq; in link_on() local
292 asyreq = malloc(sizeof(*asyreq)); in link_on()
293 if (asyreq == NULL) in link_on()
295 asyreq->req.len = 12; in link_on()
296 asyreq->req.type = FWASREQNODE; in link_on()
297 asyreq->pkt.mode.common.tcode = FWTCODE_PHY; in link_on()
298 asyreq->pkt.mode.ld[1] |= (1 << 30) | ((node & 0x3f) << 24); in link_on()
299 asyreq->pkt.mode.ld[2] = ~asyreq->pkt.mode.ld[1]; in link_on()
301 if (ioctl(fd, FW_ASYREQ, asyreq) < 0) in link_on()
303 free(asyreq); in link_on()
309 struct fw_asyreq *asyreq; in reset_start() local
311 asyreq = malloc(sizeof(*asyreq)); in reset_start()
312 if (asyreq == NULL) in reset_start()
314 asyreq->req.len = 16; in reset_start()
315 asyreq->req.type = FWASREQNODE; in reset_start()
316 asyreq->pkt.mode.wreqq.dst = FWLOCALBUS | (node & 0x3f); in reset_start()
317 asyreq->pkt.mode.wreqq.tlrt = 0; in reset_start()
318 asyreq->pkt.mode.wreqq.tcode = FWTCODE_WREQQ; in reset_start()
320 asyreq->pkt.mode.wreqq.dest_hi = 0xffff; in reset_start()
321 asyreq->pkt.mode.wreqq.dest_lo = 0xf0000000 | RESET_START; in reset_start()
323 asyreq->pkt.mode.wreqq.data = htonl(0x1); in reset_start()
325 if (ioctl(fd, FW_ASYREQ, asyreq) < 0) in reset_start()
327 free(asyreq); in reset_start()