summaryrefslogtreecommitdiff
path: root/sys/dev/ic/aic7xxx_openbsd.c
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2007-05-02 02:20:38 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2007-05-02 02:20:38 +0000
commit845d9d09285f28e135e5cf44c1c3059c33d0392d (patch)
tree10383304fd989555e6e51821e598cdaf62cf1c45 /sys/dev/ic/aic7xxx_openbsd.c
parenta86646f40726d8cec2ccf31f7052394e901118bc (diff)
Eliminate unused inline functions and replace ahc_lock() which
resolves to s = splbio() and ahc_unlock() which resolves to splx(s) with splbio/splx calls. ok marco@ dlg@
Diffstat (limited to 'sys/dev/ic/aic7xxx_openbsd.c')
-rw-r--r--sys/dev/ic/aic7xxx_openbsd.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/sys/dev/ic/aic7xxx_openbsd.c b/sys/dev/ic/aic7xxx_openbsd.c
index 693bf2bd4ee..11b69aa5305 100644
--- a/sys/dev/ic/aic7xxx_openbsd.c
+++ b/sys/dev/ic/aic7xxx_openbsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic7xxx_openbsd.c,v 1.33 2006/11/28 23:59:45 dlg Exp $ */
+/* $OpenBSD: aic7xxx_openbsd.c,v 1.34 2007/05/02 02:20:37 krw Exp $ */
/* $NetBSD: aic7xxx_osm.c,v 1.14 2003/11/02 11:07:44 wiz Exp $ */
/*
@@ -91,7 +91,7 @@ ahc_attach(struct ahc_softc *ahc)
char ahc_info[256];
int s;
- ahc_lock(ahc, &s);
+ s = splbio();
/*
* fill in the prototype scsi_links.
@@ -143,7 +143,7 @@ ahc_attach(struct ahc_softc *ahc)
&saa, scsiprint);
}
- ahc_unlock(ahc, &s);
+ splx(s);
return (1);
}
@@ -277,9 +277,9 @@ ahc_done(struct ahc_softc *ahc, struct scb *scb)
xs->error = XS_SENSE;
}
- ahc_lock(ahc, &s);
+ s = splbio();
ahc_free_scb(ahc, scb);
- ahc_unlock(ahc, &s);
+ splx(s);
xs->flags |= ITSDONE;
scsi_done(xs);
@@ -325,12 +325,12 @@ ahc_action(struct scsi_xfer *xs)
/*
* get an scb to use.
*/
- ahc_lock(ahc, &s);
+ s = splbio();
if ((scb = ahc_get_scb(ahc)) == NULL) {
- ahc_unlock(ahc, &s);
+ splx(s);
return (TRY_AGAIN_LATER);
}
- ahc_unlock(ahc, &s);
+ splx(s);
hscb = scb->hscb;
@@ -426,7 +426,7 @@ ahc_execute_scb(void *arg, bus_dma_segment_t *dm_segs, int nsegments)
scb->sg_count = nsegments;
- ahc_lock(ahc, &s);
+ s = splbio();
/*
* Last time we need to check if this SCB needs to
@@ -437,7 +437,7 @@ ahc_execute_scb(void *arg, bus_dma_segment_t *dm_segs, int nsegments)
bus_dmamap_unload(ahc->parent_dmat, scb->dmamap);
ahc_free_scb(ahc, scb);
- ahc_unlock(ahc, &s);
+ splx(s);
return (COMPLETE);
}
@@ -496,7 +496,7 @@ ahc_execute_scb(void *arg, bus_dma_segment_t *dm_segs, int nsegments)
if (xs->flags & SCSI_POLL)
goto poll;
else {
- ahc_unlock(ahc, &s);
+ splx(s);
return (SUCCESSFULLY_QUEUED);
}
}
@@ -526,7 +526,7 @@ ahc_execute_scb(void *arg, bus_dma_segment_t *dm_segs, int nsegments)
ahc->inited_target[xs->sc_link->target] = 1;
}
- ahc_unlock(ahc, &s);
+ splx(s);
return (SUCCESSFULLY_QUEUED);
}
@@ -545,7 +545,7 @@ poll:
}
} while (!(xs->flags & ITSDONE));
- ahc_unlock(ahc, &s);
+ splx(s);
return (COMPLETE);
}
@@ -580,9 +580,9 @@ ahc_setup_data(struct ahc_softc *ahc, struct scsi_xfer *xs,
hscb->cdb_len = xs->cmdlen;
if (hscb->cdb_len > sizeof(hscb->cdb32)) {
- ahc_lock(ahc, &s);
+ s = splbio();
ahc_free_scb(ahc, scb);
- ahc_unlock(ahc, &s);
+ splx(s);
xs->error = XS_DRIVER_STUFFUP;
xs->flags |= ITSDONE;
scsi_done(xs);
@@ -611,9 +611,9 @@ ahc_setup_data(struct ahc_softc *ahc, struct scsi_xfer *xs,
"= %d\n",
ahc_name(ahc), error);
#endif
- ahc_lock(ahc, &s);
+ s = splbio();
ahc_free_scb(ahc, scb);
- ahc_unlock(ahc, &s);
+ splx(s);
return (TRY_AGAIN_LATER); /* XXX fvdl */
}
error = ahc_execute_scb(scb,
@@ -637,7 +637,7 @@ ahc_timeout(void *arg)
scb = (struct scb *)arg;
ahc = (struct ahc_softc *)scb->xs->sc_link->adapter_softc;
- ahc_lock(ahc, &s);
+ s = splbio();
#ifdef AHC_DEBUG
printf("%s: SCB %d timed out\n", ahc_name(ahc), scb->hscb->tag);
@@ -666,7 +666,7 @@ ahc_timeout(void *arg)
}
ahc_unpause(ahc);
- ahc_unlock(ahc, &s);
+ splx(s);
}