Warn if a sync period requiring DT was negotiated on a peripheral not
capable of DT.
This commit is contained in:
parent
15bb1be91b
commit
c490cdc5be
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: scsipi_base.c,v 1.93 2003/09/09 02:37:55 mycroft Exp $ */
|
||||
/* $NetBSD: scsipi_base.c,v 1.94 2003/10/10 05:58:56 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 1999, 2000, 2002, 2003 The NetBSD Foundation, Inc.
|
||||
|
@ -38,7 +38,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: scsipi_base.c,v 1.93 2003/09/09 02:37:55 mycroft Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: scsipi_base.c,v 1.94 2003/10/10 05:58:56 thorpej Exp $");
|
||||
|
||||
#include "opt_scsi.h"
|
||||
|
||||
|
@ -2229,6 +2229,8 @@ scsipi_async_event(chan, event, arg)
|
|||
splx(s);
|
||||
}
|
||||
|
||||
#define SCSI_MIN_DT_PERIOD 1250 /* FAST-80 and faster require DT */
|
||||
|
||||
/*
|
||||
* scsipi_print_xfer_mode:
|
||||
*
|
||||
|
@ -2279,6 +2281,15 @@ scsipi_print_xfer_mode(periph)
|
|||
printf(", tagged queueing");
|
||||
|
||||
printf("\n");
|
||||
|
||||
/*
|
||||
* Warn if a sync period requiring DT was negotiated on a peripheral
|
||||
* not capable of DT.
|
||||
*/
|
||||
if (period < SCSI_MIN_DT_PERIOD &&
|
||||
(periph->periph_mode & PERIPH_CAP_DT) == 0)
|
||||
printf("%s: WARNING: %d.%02dns period on non-DT device\n",
|
||||
periph->periph_dev->dv_xname, period / 100, period % 100);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2342,7 +2353,7 @@ scsipi_async_event_xfer_mode(chan, xm)
|
|||
* Clamp the xfer mode down to this periph's capabilities.
|
||||
*/
|
||||
mode = xm->xm_mode & periph->periph_cap;
|
||||
if (mode & PERIPH_CAP_SYNC) {
|
||||
if (mode & (PERIPH_CAP_SYNC | PERIPH_CAP_DT)) {
|
||||
period = xm->xm_period;
|
||||
offset = xm->xm_offset;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue