summaryrefslogtreecommitdiff
path: root/sys/arch/arc/dti/btl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/arc/dti/btl.c')
-rw-r--r--sys/arch/arc/dti/btl.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/sys/arch/arc/dti/btl.c b/sys/arch/arc/dti/btl.c
index 512d33079b9..823758b33f3 100644
--- a/sys/arch/arc/dti/btl.c
+++ b/sys/arch/arc/dti/btl.c
@@ -159,6 +159,8 @@ void btminphys __P((struct buf *));
int bt_scsi_cmd __P((struct scsi_xfer *));
int bt_poll __P((struct bt_softc *, struct scsi_xfer *, int));
void bt_timeout __P((void *arg));
+void bt_free_buf __P((struct bt_softc *, struct bt_buf *));
+struct bt_buf * bt_get_buf __P((struct bt_softc *, int));
struct scsi_adapter bt_switch = {
bt_scsi_cmd,
@@ -716,7 +718,7 @@ bt_get_buf(sc, flags)
buf = sc->sc_free_buf.tqh_first;
if (buf) {
TAILQ_REMOVE(&sc->sc_free_buf, buf, chain);
- sc->sc_numbufs;
+ sc->sc_numbufs--;
break;
}
if ((flags & SCSI_NOSLEEP) != 0)
@@ -769,7 +771,6 @@ bt_collect_mbo(sc)
struct bt_softc *sc;
{
struct bt_mbx_out *wmbo; /* Mail Box Out pointer */
- struct bt_ccb *ccb;
wmbo = wmbx->cmbo;
@@ -909,7 +910,7 @@ bt_done(sc, ccb)
xs->resid = 0;
}
- if(datalen = xs->datalen) {
+ if((datalen = xs->datalen) != 0) {
thiskv = (int)xs->data;
sg = ccb->scat_gath;
seg = phystol(ccb->data_length) / sizeof(struct bt_scat_gath);
@@ -947,8 +948,6 @@ bt_find(ia, sc)
u_char sts;
struct bt_extended_inquire inquire;
struct bt_config config;
- struct bt_revision revision;
- struct bt_digit digit;
int irq, drq;
/*
@@ -1362,11 +1361,6 @@ badbuf:
xs->error = XS_DRIVER_STUFFUP;
bt_free_ccb(sc, ccb);
return TRY_AGAIN_LATER;
-
-bad:
- xs->error = XS_DRIVER_STUFFUP;
- bt_free_ccb(sc, ccb);
- return COMPLETE;
}
/*