mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-30 08:19:09 +00:00
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)
This commit is contained in:
parent
38857e7f73
commit
481a41742f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=107437
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user