diff options
author | simokawa <simokawa@FreeBSD.org> | 2007-03-16 05:11:42 +0000 |
---|---|---|
committer | simokawa <simokawa@FreeBSD.org> | 2007-03-16 05:11:42 +0000 |
commit | 7796b5037d11a16610b9d0aa1f5317ee5540c894 (patch) | |
tree | 5f912904bf906cdb26e8b33a64f2fbda44dffd34 /sys | |
parent | d21a51989f923f9c3807aa103ec74bb9c6eb45fe (diff) | |
download | FreeBSD-src-7796b5037d11a16610b9d0aa1f5317ee5540c894.zip FreeBSD-src-7796b5037d11a16610b9d0aa1f5317ee5540c894.tar.gz |
* Remove xfer->retry_req.
It is unnecessary because retry is done by OHCI.
Further retry should be done by applications.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/firewire/firewire.c | 32 | ||||
-rw-r--r-- | sys/dev/firewire/firewirereg.h | 3 | ||||
-rw-r--r-- | sys/dev/firewire/fwmem.c | 1 | ||||
-rw-r--r-- | sys/dev/firewire/fwohci.c | 8 | ||||
-rw-r--r-- | sys/dev/firewire/if_fwe.c | 1 | ||||
-rw-r--r-- | sys/dev/firewire/if_fwip.c | 1 | ||||
-rw-r--r-- | sys/dev/firewire/sbp.c | 2 | ||||
-rw-r--r-- | sys/dev/firewire/sbp_targ.c | 1 |
8 files changed, 4 insertions, 45 deletions
diff --git a/sys/dev/firewire/firewire.c b/sys/dev/firewire/firewire.c index 8dba5c2..cb37b28 100644 --- a/sys/dev/firewire/firewire.c +++ b/sys/dev/firewire/firewire.c @@ -257,7 +257,6 @@ fw_asyreq(struct firewire_comm *fc, int sub, struct fw_xfer *xfer) xfer->resp = 0; xfer->fc = fc; xfer->q = xferq; - xfer->retry_req = fw_asybusy; fw_asystart(xfer); return err; @@ -293,13 +292,6 @@ fw_asystart(struct fw_xfer *xfer) { struct firewire_comm *fc = xfer->fc; int s; - if(xfer->retry++ >= fc->max_asyretry){ - device_printf(fc->bdev, "max_asyretry exceeded\n"); - xfer->resp = EBUSY; - xfer->state = FWXF_BUSY; - xfer->act.hand(xfer); - return; - } #if 0 /* XXX allow bus explore packets only after bus rest */ if (fc->status < FWBUSEXPLORE) { xfer->resp = EAGAIN; @@ -416,7 +408,6 @@ firewire_attach(device_t dev) CALLOUT_INIT(&sc->fc->timeout_callout); CALLOUT_INIT(&sc->fc->bmr_callout); - CALLOUT_INIT(&sc->fc->retry_probe_callout); CALLOUT_INIT(&sc->fc->busprobe_callout); callout_reset(&sc->fc->timeout_callout, hz, @@ -487,7 +478,6 @@ firewire_detach(device_t dev) callout_stop(&sc->fc->timeout_callout); callout_stop(&sc->fc->bmr_callout); - callout_stop(&sc->fc->retry_probe_callout); callout_stop(&sc->fc->busprobe_callout); /* XXX xfree_free and untimeout on all xfers */ @@ -710,8 +700,6 @@ void fw_init(struct firewire_comm *fc) struct fw_bind *fwb; #endif - fc->max_asyretry = FW_MAXASYRTY; - fc->arq->queued = 0; fc->ars->queued = 0; fc->atq->queued = 0; @@ -1055,7 +1043,6 @@ fw_xfer_unload(struct fw_xfer* xfer) } xfer->state = FWXF_INIT; xfer->resp = 0; - xfer->retry = 0; } /* * To free IEEE1394 XFER structure. @@ -1113,7 +1100,6 @@ fw_phy_config(struct firewire_comm *fc, int root_node, int gap_count) if (xfer == NULL) return; xfer->fc = fc; - xfer->retry_req = fw_asybusy; xfer->act.hand = fw_asy_callback_free; fp = &xfer->send.hdr; @@ -1277,7 +1263,6 @@ fw_bus_probe(struct firewire_comm *fc) s = splfw(); fc->status = FWBUSEXPLORE; - fc->retry_count = 0; /* Invalidate all devices, just after bus reset. */ STAILQ_FOREACH(fwdev, &fc->devices, link) @@ -1508,12 +1493,8 @@ fw_bus_explore_callback(struct fw_xfer *xfer) if(xfer->resp != 0){ device_printf(fc->bdev, - "bus_explore node=%d addr=0x%x resp=%d retry=%d\n", - fc->ongonode, fc->ongoaddr, xfer->resp, xfer->retry); - if (xfer->retry < fc->max_asyretry) { - fw_asystart(xfer); - return; - } + "bus_explore node=%d addr=0x%x resp=%d\n", + fc->ongonode, fc->ongoaddr, xfer->resp); goto errnode; } @@ -1694,14 +1675,6 @@ fw_attach_dev(struct firewire_comm *fc) } free(devlistp, M_TEMP); - if (fc->retry_count > 0) { - device_printf(fc->bdev, "bus_explore failed for %d nodes\n", - fc->retry_count); -#if 0 - callout_reset(&fc->retry_probe_callout, hz*2, - (void *)fc->ibr, (void *)fc); -#endif - } return; } @@ -2171,7 +2144,6 @@ 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->retry_req = fw_asybusy; 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 4061b8b..0e037cc 100644 --- a/sys/dev/firewire/firewirereg.h +++ b/sys/dev/firewire/firewirereg.h @@ -152,7 +152,6 @@ struct firewire_comm{ struct callout busprobe_callout; struct callout bmr_callout; struct callout timeout_callout; - struct callout retry_probe_callout; uint32_t (*cyctimer) (struct firewire_comm *); void (*ibr) (struct firewire_comm *); uint32_t (*set_bmr) (struct firewire_comm *, uint32_t); @@ -252,9 +251,7 @@ struct fw_xfer{ #define FWXF_BUSY 8 #define FWXF_RCVD 10 uint8_t state; - uint8_t retry; uint8_t tl; - void (*retry_req) (struct fw_xfer *); union{ void (*hand) (struct fw_xfer *); } act; diff --git a/sys/dev/firewire/fwmem.c b/sys/dev/firewire/fwmem.c index 4fac8dd..ee5b0f8 100644 --- a/sys/dev/firewire/fwmem.c +++ b/sys/dev/firewire/fwmem.c @@ -115,7 +115,6 @@ fwmem_xfer_req( else xfer->send.spd = min(spd, fwdev->speed); xfer->act.hand = hand; - xfer->retry_req = fw_asybusy; xfer->sc = sc; xfer->send.pay_len = slen; xfer->recv.pay_len = rlen; diff --git a/sys/dev/firewire/fwohci.c b/sys/dev/firewire/fwohci.c index 1a181c1..98de97d 100644 --- a/sys/dev/firewire/fwohci.c +++ b/sys/dev/firewire/fwohci.c @@ -1125,12 +1125,8 @@ fwohci_txd(struct fwohci_softc *sc, struct fwohci_dbch *dbch) if (err == EBUSY && fc->status != FWBUSRESET) { xfer->state = FWXF_BUSY; xfer->resp = err; - if (xfer->retry_req != NULL) - xfer->retry_req(xfer); - else { - xfer->recv.pay_len = 0; - fw_xfer_done(xfer); - } + xfer->recv.pay_len = 0; + fw_xfer_done(xfer); } else if (stat != FWOHCIEV_ACKPEND) { if (stat != FWOHCIEV_ACKCOMPL) xfer->state = FWXF_SENTERR; diff --git a/sys/dev/firewire/if_fwe.c b/sys/dev/firewire/if_fwe.c index 3ca754b..2987048 100644 --- a/sys/dev/firewire/if_fwe.c +++ b/sys/dev/firewire/if_fwe.c @@ -384,7 +384,6 @@ found: break; xfer->send.spd = tx_speed; xfer->fc = fwe->fd.fc; - xfer->retry_req = fw_asybusy; xfer->sc = (caddr_t)fwe; xfer->act.hand = fwe_output_callback; STAILQ_INSERT_TAIL(&fwe->xferlist, xfer, link); diff --git a/sys/dev/firewire/if_fwip.c b/sys/dev/firewire/if_fwip.c index c9587f0..a3f26a4 100644 --- a/sys/dev/firewire/if_fwip.c +++ b/sys/dev/firewire/if_fwip.c @@ -380,7 +380,6 @@ found: break; xfer->send.spd = tx_speed; xfer->fc = fwip->fd.fc; - xfer->retry_req = fw_asybusy; xfer->sc = (caddr_t)fwip; xfer->act.hand = fwip_output_callback; STAILQ_INSERT_TAIL(&fwip->xferlist, xfer, link); diff --git a/sys/dev/firewire/sbp.c b/sys/dev/firewire/sbp.c index ed4178a..31089f1 100644 --- a/sys/dev/firewire/sbp.c +++ b/sys/dev/firewire/sbp.c @@ -1320,7 +1320,6 @@ sbp_write_cmd(struct sbp_dev *sdev, int tcode, int offset) xfer->recv.pay_len = 0; xfer->send.spd = min(sdev->target->fwdev->speed, max_speed); xfer->fc = sdev->target->sbp->fd.fc; - xfer->retry_req = fw_asybusy; } if (tcode == FWTCODE_WREQB) @@ -1878,7 +1877,6 @@ done0: xfer->dst = sfp->mode.wres.dst; xfer->spd = min(sdev->target->fwdev->speed, max_speed); xfer->act.hand = sbp_loginres_callback; - xfer->retry_req = fw_asybusy; sfp->mode.wres.tlrt = rfp->mode.wreqb.tlrt; sfp->mode.wres.tcode = FWTCODE_WRES; diff --git a/sys/dev/firewire/sbp_targ.c b/sys/dev/firewire/sbp_targ.c index 5267ea3..4d05660 100644 --- a/sys/dev/firewire/sbp_targ.c +++ b/sys/dev/firewire/sbp_targ.c @@ -1595,7 +1595,6 @@ done: sfp = &xfer->send.hdr; xfer->send.spd = 2; /* XXX */ xfer->act.hand = sbp_targ_resp_callback; - xfer->retry_req = fw_asybusy; sfp->mode.wres.dst = fp->mode.wreqb.src; sfp->mode.wres.tlrt = fp->mode.wreqb.tlrt; sfp->mode.wres.tcode = FWTCODE_WRES; |