diff options
author | simokawa <simokawa@FreeBSD.org> | 2007-03-16 05:39:33 +0000 |
---|---|---|
committer | simokawa <simokawa@FreeBSD.org> | 2007-03-16 05:39:33 +0000 |
commit | c93bd7d0c41d724f25881bf2da44b9707ceabd9f (patch) | |
tree | 25a640683f5e2c73ee8e3a1eb2d476fce463ad15 /sys/dev/firewire | |
parent | a59c4504d1cedb428c000359fbb3dbcc273c651c (diff) | |
download | FreeBSD-src-c93bd7d0c41d724f25881bf2da44b9707ceabd9f.zip FreeBSD-src-c93bd7d0c41d724f25881bf2da44b9707ceabd9f.tar.gz |
Replace xfer->act.hand with xfer->hand.
Diffstat (limited to 'sys/dev/firewire')
-rw-r--r-- | sys/dev/firewire/firewire.c | 32 | ||||
-rw-r--r-- | sys/dev/firewire/firewirereg.h | 4 | ||||
-rw-r--r-- | sys/dev/firewire/fwdev.c | 2 | ||||
-rw-r--r-- | sys/dev/firewire/fwmem.c | 2 | ||||
-rw-r--r-- | sys/dev/firewire/if_fwe.c | 2 | ||||
-rw-r--r-- | sys/dev/firewire/if_fwip.c | 4 | ||||
-rw-r--r-- | sys/dev/firewire/sbp.c | 18 | ||||
-rw-r--r-- | sys/dev/firewire/sbp_targ.c | 6 |
8 files changed, 34 insertions, 36 deletions
diff --git a/sys/dev/firewire/firewire.c b/sys/dev/firewire/firewire.c index aaa69b6..a091f8b 100644 --- a/sys/dev/firewire/firewire.c +++ b/sys/dev/firewire/firewire.c @@ -204,8 +204,8 @@ fw_asyreq(struct firewire_comm *fc, int sub, struct fw_xfer *xfer) struct tcode_info *info; if(xfer == NULL) return EINVAL; - if(xfer->act.hand == NULL){ - printf("act.hand == NULL\n"); + if(xfer->hand == NULL){ + printf("hand == NULL\n"); return EINVAL; } fp = &xfer->send.hdr; @@ -296,8 +296,8 @@ fw_asystart(struct fw_xfer *xfer) if (fc->status < FWBUSEXPLORE) { xfer->resp = EAGAIN; xfer->state = FWXF_BUSY; - if (xfer->act.hand != NULL) - xfer->act.hand(xfer); + if (xfer->hand != NULL) + xfer->hand(xfer); return; } #endif @@ -802,7 +802,7 @@ void fw_init(struct firewire_comm *fc) fw_xfer_free(xfer); return; } - xfer->act.hand = fw_vmaccess; + xfer->hand = fw_vmaccess; xfer->fc = fc; xfer->sc = NULL; @@ -1005,15 +1005,15 @@ fw_xfer_alloc_buf(struct malloc_type *type, int send_len, int recv_len) void fw_xfer_done(struct fw_xfer *xfer) { - if (xfer->act.hand == NULL) { - printf("act.hand == NULL\n"); + if (xfer->hand == NULL) { + printf("hand == NULL\n"); return; } if (xfer->fc == NULL) panic("fw_xfer_done: why xfer->fc is NULL?"); - xfer->act.hand(xfer); + xfer->hand(xfer); } void @@ -1100,7 +1100,7 @@ fw_phy_config(struct firewire_comm *fc, int root_node, int gap_count) if (xfer == NULL) return; xfer->fc = fc; - xfer->act.hand = fw_asy_callback_free; + xfer->hand = fw_asy_callback_free; fp = &xfer->send.hdr; fp->mode.ld[1] = 0; @@ -1407,7 +1407,7 @@ dorequest: fp->mode.rreqq.src = 0; fp->mode.rreqq.dst = FWLOCALBUS | fc->ongonode; fp->mode.rreqq.dest_lo = addr; - xfer->act.hand = fw_bus_explore_callback; + xfer->hand = fw_bus_explore_callback; if (firewire_debug) printf("node%d: explore addr=0x%x\n", @@ -1457,7 +1457,7 @@ asyreqq(struct firewire_comm *fc, uint8_t spd, uint8_t tl, uint8_t rt, fp->mode.rreqq.src = 0; fp->mode.rreqq.dst = addr_hi >> 16; fp->mode.rreqq.dest_lo = addr_lo; - xfer->act.hand = hand; + xfer->hand = hand; err = fw_asyreq(fc, -1, xfer); if(err){ @@ -1897,9 +1897,9 @@ fw_rcv(struct fw_rcv_buf *rb) resfp->mode.rresb.extcode = 0; resfp->mode.rresb.len = 0; /* - rb->xfer->act.hand = fw_asy_callback; + rb->xfer->hand = fw_asy_callback; */ - rb->xfer->act.hand = fw_xfer_free; + rb->xfer->hand = fw_xfer_free; if(fw_asyreq(rb->fc, -1, rb->xfer)){ fw_xfer_free(rb->xfer); return; @@ -1919,7 +1919,7 @@ fw_rcv(struct fw_rcv_buf *rb) } STAILQ_REMOVE_HEAD(&bind->xferlist, link); fw_rcv_copy(rb); - rb->xfer->act.hand(rb->xfer); + rb->xfer->hand(rb->xfer); return; break; case FWACT_CH: @@ -2067,7 +2067,7 @@ fw_try_bmr(void *arg) fp->mode.lreq.dest_lo = 0xf0000000 | BUS_MGR_ID; xfer->send.payload[0] = htonl(0x3f); xfer->send.payload[1] = htonl(fc->nodeid); - xfer->act.hand = fw_try_bmr_callback; + xfer->hand = fw_try_bmr_callback; err = fw_asyreq(fc, -1, xfer); if(err){ @@ -2142,7 +2142,7 @@ fw_vmaccess(struct fw_xfer *xfer){ } sfp->mode.hdr.dst = rfp->mode.hdr.src; xfer->dst = ntohs(rfp->mode.hdr.src); - xfer->act.hand = fw_xfer_free; + xfer->hand = fw_xfer_free; sfp->mode.hdr.tlrt = rfp->mode.hdr.tlrt; sfp->mode.hdr.pri = 0; diff --git a/sys/dev/firewire/firewirereg.h b/sys/dev/firewire/firewirereg.h index ce63115..c1bfbf7 100644 --- a/sys/dev/firewire/firewirereg.h +++ b/sys/dev/firewire/firewirereg.h @@ -250,9 +250,7 @@ struct fw_xfer{ #define FWXF_RCVD 10 uint8_t state; uint8_t tl; - union{ - void (*hand) (struct fw_xfer *); - } act; + void (*hand) (struct fw_xfer *); struct { struct fw_pkt hdr; uint32_t *payload; diff --git a/sys/dev/firewire/fwdev.c b/sys/dev/firewire/fwdev.c index 5b46190..60e7384 100644 --- a/sys/dev/firewire/fwdev.c +++ b/sys/dev/firewire/fwdev.c @@ -579,7 +579,7 @@ fw_ioctl (struct cdev *dev, u_long cmd, caddr_t data, int flag, fw_proc *td) bcopy((char *)fp + tinfo->hdr_len, (void *)xfer->send.payload, pay_len); xfer->send.spd = asyreq->req.sped; - xfer->act.hand = fw_asy_callback; + xfer->hand = fw_asy_callback; if ((err = fw_asyreq(sc->fc, -1, xfer)) != 0) goto out; diff --git a/sys/dev/firewire/fwmem.c b/sys/dev/firewire/fwmem.c index ee5b0f8..b6e7f70 100644 --- a/sys/dev/firewire/fwmem.c +++ b/sys/dev/firewire/fwmem.c @@ -114,7 +114,7 @@ fwmem_xfer_req( xfer->send.spd = fwdev->speed; else xfer->send.spd = min(spd, fwdev->speed); - xfer->act.hand = hand; + xfer->hand = hand; xfer->sc = sc; xfer->send.pay_len = slen; xfer->recv.pay_len = rlen; diff --git a/sys/dev/firewire/if_fwe.c b/sys/dev/firewire/if_fwe.c index 2987048..b56c5cd 100644 --- a/sys/dev/firewire/if_fwe.c +++ b/sys/dev/firewire/if_fwe.c @@ -385,7 +385,7 @@ found: xfer->send.spd = tx_speed; xfer->fc = fwe->fd.fc; xfer->sc = (caddr_t)fwe; - xfer->act.hand = fwe_output_callback; + xfer->hand = fwe_output_callback; STAILQ_INSERT_TAIL(&fwe->xferlist, xfer, link); } } else diff --git a/sys/dev/firewire/if_fwip.c b/sys/dev/firewire/if_fwip.c index a3f26a4..1f27c9b 100644 --- a/sys/dev/firewire/if_fwip.c +++ b/sys/dev/firewire/if_fwip.c @@ -365,7 +365,7 @@ found: m = m_getcl(M_TRYWAIT, MT_DATA, M_PKTHDR); xfer->recv.payload = mtod(m, uint32_t *); xfer->recv.pay_len = MCLBYTES; - xfer->act.hand = fwip_unicast_input; + xfer->hand = fwip_unicast_input; xfer->fc = fc; xfer->sc = (caddr_t)fwip; xfer->mbuf = m; @@ -381,7 +381,7 @@ found: xfer->send.spd = tx_speed; xfer->fc = fwip->fd.fc; xfer->sc = (caddr_t)fwip; - xfer->act.hand = fwip_output_callback; + xfer->hand = fwip_output_callback; STAILQ_INSERT_TAIL(&fwip->xferlist, xfer, link); } } else diff --git a/sys/dev/firewire/sbp.c b/sys/dev/firewire/sbp.c index 31089f1..c796d68 100644 --- a/sys/dev/firewire/sbp.c +++ b/sys/dev/firewire/sbp.c @@ -936,7 +936,7 @@ SBP_DEBUG(0) END_DEBUG xfer = sbp_write_cmd(sdev, FWTCODE_WREQQ, 0); - xfer->act.hand = sbp_reset_start_callback; + xfer->hand = sbp_reset_start_callback; fp = &xfer->send.hdr; fp->mode.wreqq.dest_hi = 0xffff; fp->mode.wreqq.dest_lo = 0xf0000000 | RESET_START; @@ -1127,9 +1127,9 @@ END_DEBUG if (xfer == NULL) return; if (sdev->status == SBP_DEV_ATTACHED || sdev->status == SBP_DEV_PROBE) - xfer->act.hand = sbp_agent_reset_callback; + xfer->hand = sbp_agent_reset_callback; else - xfer->act.hand = sbp_do_attach; + xfer->hand = sbp_do_attach; fp = &xfer->send.hdr; fp->mode.wreqq.data = htonl(0xf); fw_asyreq(xfer->fc, -1, xfer); @@ -1161,7 +1161,7 @@ SBP_DEBUG(0) END_DEBUG xfer = sbp_write_cmd(sdev, FWTCODE_WREQQ, 0); - xfer->act.hand = sbp_busy_timeout_callback; + xfer->hand = sbp_busy_timeout_callback; fp = &xfer->send.hdr; fp->mode.wreqq.dest_hi = 0xffff; fp->mode.wreqq.dest_lo = 0xf0000000 | BUSY_TIMEOUT; @@ -1219,7 +1219,7 @@ END_DEBUG xfer = sbp_write_cmd(sdev, FWTCODE_WREQB, 0x08); if (xfer == NULL) return; - xfer->act.hand = sbp_orb_pointer_callback; + xfer->hand = sbp_orb_pointer_callback; fp = &xfer->send.hdr; fp->mode.wreqb.len = 8; @@ -1276,7 +1276,7 @@ END_DEBUG xfer = sbp_write_cmd(sdev, FWTCODE_WREQQ, 0x10); if (xfer == NULL) return; - xfer->act.hand = sbp_doorbell_callback; + xfer->hand = sbp_doorbell_callback; fp = &xfer->send.hdr; fp->mode.wreqq.data = htonl(0xf); fw_asyreq(xfer->fc, -1, xfer); @@ -1418,7 +1418,7 @@ start: if(xfer == NULL){ return; } - xfer->act.hand = sbp_mgm_callback; + xfer->hand = sbp_mgm_callback; fp = &xfer->send.hdr; fp->mode.wreqb.dest_hi = sdev->target->mgm_hi; @@ -1876,7 +1876,7 @@ done0: sfp->mode.wres.dst = rfp->mode.wreqb.src; xfer->dst = sfp->mode.wres.dst; xfer->spd = min(sdev->target->fwdev->speed, max_speed); - xfer->act.hand = sbp_loginres_callback; + xfer->hand = sbp_loginres_callback; sfp->mode.wres.tlrt = rfp->mode.wreqb.tlrt; sfp->mode.wres.tcode = FWTCODE_WRES; @@ -1993,7 +1993,7 @@ END_DEBUG xfer = fw_xfer_alloc_buf(M_SBP, /* send */0, /* recv */SBP_RECV_LEN); - xfer->act.hand = sbp_recv; + xfer->hand = sbp_recv; #if NEED_RESPONSE xfer->fc = sbp->fd.fc; #endif diff --git a/sys/dev/firewire/sbp_targ.c b/sys/dev/firewire/sbp_targ.c index 4d05660..eb23412 100644 --- a/sys/dev/firewire/sbp_targ.c +++ b/sys/dev/firewire/sbp_targ.c @@ -1458,7 +1458,7 @@ sbp_targ_resp_callback(struct fw_xfer *xfer) sc = (struct sbp_targ_softc *)xfer->sc; fw_xfer_unload(xfer); xfer->recv.pay_len = SBP_TARG_RECV_LEN; - xfer->act.hand = sbp_targ_recv; + xfer->hand = sbp_targ_recv; s = splfw(); STAILQ_INSERT_TAIL(&sc->fwb.xferlist, xfer, link); splx(s); @@ -1594,7 +1594,7 @@ done: printf("%s: rtcode = %d\n", __func__, rtcode); sfp = &xfer->send.hdr; xfer->send.spd = 2; /* XXX */ - xfer->act.hand = sbp_targ_resp_callback; + xfer->hand = sbp_targ_resp_callback; sfp->mode.wres.dst = fp->mode.wreqb.src; sfp->mode.wres.tlrt = fp->mode.wreqb.tlrt; sfp->mode.wres.tcode = FWTCODE_WRES; @@ -1652,7 +1652,7 @@ sbp_targ_attach(device_t dev) xfer = fw_xfer_alloc_buf(M_SBP_TARG, /* send */ 0, /* recv */ SBP_TARG_RECV_LEN); - xfer->act.hand = sbp_targ_recv; + xfer->hand = sbp_targ_recv; xfer->fc = sc->fd.fc; xfer->sc = (caddr_t)sc; STAILQ_INSERT_TAIL(&sc->fwb.xferlist, xfer, link); |