diff options
author | scottl <scottl@FreeBSD.org> | 2002-12-01 07:50:56 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2002-12-01 07:50:56 +0000 |
commit | 47a5fb032f7b94b3f08244d614c49ea4c6db89ad (patch) | |
tree | dc7410f752702403d78df884b40f3dee632ae35f /sys/dev/aic7xxx | |
parent | 7892b90ccadb0576dac25b12159e126517310b59 (diff) | |
download | FreeBSD-src-47a5fb032f7b94b3f08244d614c49ea4c6db89ad.zip FreeBSD-src-47a5fb032f7b94b3f08244d614c49ea4c6db89ad.tar.gz |
Update to include new ahd_scb_timer_reset API
Move IOCell paramters into softc and add a hook for the
OSM to modify these as well as other settings prior to
committing them to the chip.
Approved by: re (blanket)
Diffstat (limited to 'sys/dev/aic7xxx')
-rw-r--r-- | sys/dev/aic7xxx/aic79xx_osm.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/sys/dev/aic7xxx/aic79xx_osm.h b/sys/dev/aic7xxx/aic79xx_osm.h index b645010..6379a02 100644 --- a/sys/dev/aic7xxx/aic79xx_osm.h +++ b/sys/dev/aic7xxx/aic79xx_osm.h @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/aic79xx_osm.h#14 $ + * $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/aic79xx_osm.h#18 $ * * $FreeBSD$ */ @@ -222,6 +222,7 @@ typedef struct callout ahd_timer_t; #include <dev/aic7xxx/aic79xx.h> /***************************** Timer Facilities *******************************/ +timeout_t ahd_timeout; #if __FreeBSD_version >= 500000 #define ahd_timer_init(timer) callout_init(timer, /*mpsafe*/0) #else @@ -230,11 +231,18 @@ typedef struct callout ahd_timer_t; #define ahd_timer_stop callout_stop static __inline void -ahd_timer_reset(ahd_timer_t *timer, int usec, ahd_callback_t *func, void *arg) +ahd_timer_reset(ahd_timer_t *timer, u_int usec, ahd_callback_t *func, void *arg) { callout_reset(timer, (usec * hz)/1000000, func, arg); } +static __inline void +ahd_scb_timer_reset(struct scb *scb, u_int usec) +{ + callout_reset(scb->io_ctx->ccb_h.timeout_ch.callout, + (usec * hz)/1000000, ahd_timeout, scb); +} + /*************************** Device Access ************************************/ #define ahd_inb(ahd, port) \ bus_space_read_1((ahd)->tags[(port) >> 8], \ @@ -580,6 +588,8 @@ int ahd_map_int(struct ahd_softc *ahd); int ahd_attach(struct ahd_softc *); int ahd_softc_comp(struct ahd_softc *lahd, struct ahd_softc *rahd); int ahd_detach(device_t); +#define ahd_platform_init(arg) + /****************************** Interrupts ************************************/ void ahd_platform_intr(void *); @@ -590,7 +600,6 @@ ahd_platform_flushwork(struct ahd_softc *ahd) } /************************ Misc Function Declarations **************************/ -timeout_t ahd_timeout; void ahd_done(struct ahd_softc *ahd, struct scb *scb); void ahd_send_async(struct ahd_softc *, char /*channel*/, u_int /*target*/, u_int /*lun*/, ac_code, void *arg); |