* Remove xfer->retry_req.

It is unnecessary because retry is done by OHCI.
   Further retry should be done by applications.
This commit is contained in:
Hidetoshi Shimokawa 2007-03-16 05:11:42 +00:00
parent ac44778260
commit 976c8eadc9
8 changed files with 4 additions and 45 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -384,7 +384,6 @@ fwe_init(void *arg)
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);

View File

@ -380,7 +380,6 @@ fwip_init(void *arg)
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);

View File

@ -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 @@ printf("len %d\n", sbp_status->len);
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;

View File

@ -1595,7 +1595,6 @@ sbp_targ_recv(struct fw_xfer *xfer)
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;