mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-19 10:53:58 +00:00
Add aic_scb_timer_start() which will be used in the aic7xxx driver to
start the timer on SCBs queued in the untagged SCB queue. The core treats timeouts in usecs to satisfy Linux requirements. Multiply accordingly.
This commit is contained in:
parent
a894993de1
commit
9fe88a385d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=129132
@ -30,7 +30,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/aic_osm_lib.h#4 $
|
* $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/aic_osm_lib.h#5 $
|
||||||
*
|
*
|
||||||
* $FreeBSD$
|
* $FreeBSD$
|
||||||
*/
|
*/
|
||||||
@ -207,7 +207,7 @@ aic_timer_reset(aic_timer_t *timer, u_int usec, aic_callback_t *func, void *arg)
|
|||||||
static __inline u_int
|
static __inline u_int
|
||||||
aic_get_timeout(struct scb *scb)
|
aic_get_timeout(struct scb *scb)
|
||||||
{
|
{
|
||||||
return (scb->io_ctx->ccb_h.timeout);
|
return (scb->io_ctx->ccb_h.timeout * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
static __inline void
|
static __inline void
|
||||||
@ -219,6 +219,21 @@ aic_scb_timer_reset(struct scb *scb, u_int usec)
|
|||||||
timeout(aic_platform_timeout, scb, (usec * hz)/1000000);
|
timeout(aic_platform_timeout, scb, (usec * hz)/1000000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static __inline void
|
||||||
|
aic_scb_timer_start(struct scb *scb)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (scb->io_ctx->ccb_h.timeout != CAM_TIME_INFINITY) {
|
||||||
|
uint64_t time;
|
||||||
|
|
||||||
|
time = scb->io_ctx->ccb_h.timeout;
|
||||||
|
time *= hz;
|
||||||
|
time /= 1000;
|
||||||
|
scb->io_ctx->ccb_h.timeout_ch =
|
||||||
|
timeout(aic_platform_timeout, scb, time);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/************************** Transaction Operations ****************************/
|
/************************** Transaction Operations ****************************/
|
||||||
static __inline void aic_set_transaction_status(struct scb *, uint32_t);
|
static __inline void aic_set_transaction_status(struct scb *, uint32_t);
|
||||||
static __inline void aic_set_scsi_status(struct scb *, uint32_t);
|
static __inline void aic_set_scsi_status(struct scb *, uint32_t);
|
||||||
|
Loading…
Reference in New Issue
Block a user