mpt.h (260058) | mpt.h (274819) |
---|---|
1/* $FreeBSD: head/sys/dev/mpt/mpt.h 260058 2013-12-29 20:41:32Z marius $ */ | 1/* $FreeBSD: head/sys/dev/mpt/mpt.h 274819 2014-11-21 21:01:24Z smh $ */ |
2/*- 3 * Generic defines for LSI '909 FC adapters. 4 * FreeBSD Version. 5 * 6 * Copyright (c) 2000, 2001 by Greg Ansley 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 756 unchanged lines hidden (view full) --- 766 mtx_destroy(&mpt->mpt_lock); \ 767 mpt->mpt_locksetup = 0; \ 768 } 769 770#define MPT_LOCK(mpt) mtx_lock(&(mpt)->mpt_lock) 771#define MPT_UNLOCK(mpt) mtx_unlock(&(mpt)->mpt_lock) 772#define MPT_OWNED(mpt) mtx_owned(&(mpt)->mpt_lock) 773#define MPT_LOCK_ASSERT(mpt) mtx_assert(&(mpt)->mpt_lock, MA_OWNED) | 2/*- 3 * Generic defines for LSI '909 FC adapters. 4 * FreeBSD Version. 5 * 6 * Copyright (c) 2000, 2001 by Greg Ansley 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 756 unchanged lines hidden (view full) --- 766 mtx_destroy(&mpt->mpt_lock); \ 767 mpt->mpt_locksetup = 0; \ 768 } 769 770#define MPT_LOCK(mpt) mtx_lock(&(mpt)->mpt_lock) 771#define MPT_UNLOCK(mpt) mtx_unlock(&(mpt)->mpt_lock) 772#define MPT_OWNED(mpt) mtx_owned(&(mpt)->mpt_lock) 773#define MPT_LOCK_ASSERT(mpt) mtx_assert(&(mpt)->mpt_lock, MA_OWNED) |
774#define mpt_sleep(mpt, ident, priority, wmesg, timo) \ 775 msleep(ident, &(mpt)->mpt_lock, priority, wmesg, timo) 776#define mpt_req_timeout(req, ticks, func, arg) \ 777 callout_reset(&(req)->callout, (ticks), (func), (arg)) | 774#define mpt_sleep(mpt, ident, priority, wmesg, sbt) \ 775 msleep_sbt(ident, &(mpt)->mpt_lock, priority, wmesg, sbt, 0, 0) 776#define mpt_req_timeout(req, sbt, func, arg) \ 777 callout_reset_sbt(&(req)->callout, (sbt), 0, (func), (arg), 0) |
778#define mpt_req_untimeout(req, func, arg) \ 779 callout_stop(&(req)->callout) 780#define mpt_callout_init(mpt, c) \ 781 callout_init_mtx(c, &(mpt)->mpt_lock, 0) 782#define mpt_callout_drain(mpt, c) \ 783 callout_drain(c) 784 785/******************************* Register Access ******************************/ --- 363 unchanged lines hidden --- | 778#define mpt_req_untimeout(req, func, arg) \ 779 callout_stop(&(req)->callout) 780#define mpt_callout_init(mpt, c) \ 781 callout_init_mtx(c, &(mpt)->mpt_lock, 0) 782#define mpt_callout_drain(mpt, c) \ 783 callout_drain(c) 784 785/******************************* Register Access ******************************/ --- 363 unchanged lines hidden --- |