mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 17:04:19 +01:00
Continue previous fix:
Add MIN_DELAY definition instead of hard-coded 10
This commit is contained in:
parent
84f33dea62
commit
de662aeac4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=2314
@ -39,7 +39,7 @@
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: mcd.c,v 1.18 1994/08/13 03:50:09 wollman Exp $
|
||||
* $Id: mcd.c,v 1.19 1994/08/27 13:15:25 ache Exp $
|
||||
*/
|
||||
static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";
|
||||
|
||||
@ -62,6 +62,8 @@ static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";
|
||||
#include <i386/isa/isa_device.h>
|
||||
#include <i386/isa/mcdreg.h>
|
||||
|
||||
#define MIN_DELAY 10
|
||||
|
||||
/* user definable options */
|
||||
/*#define MCD_TO_WARNING_ON*/ /* define to get timeout messages */
|
||||
/*#define MCDMINI*/ /* define for a mini configuration for boot kernel */
|
||||
@ -637,10 +639,10 @@ mcd_waitrdy(int port,int dly)
|
||||
int i;
|
||||
|
||||
/* wait until xfer port senses data ready */
|
||||
for (i=0; i<dly; i++) {
|
||||
for (i=0; i<dly; i+=MIN_DELAY) {
|
||||
if ((inb(port+mcd_xfer) & MCD_ST_BUSY)==0)
|
||||
return 0;
|
||||
DELAY(10);
|
||||
DELAY(MIN_DELAY);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
@ -39,7 +39,7 @@
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: mcd.c,v 1.18 1994/08/13 03:50:09 wollman Exp $
|
||||
* $Id: mcd.c,v 1.19 1994/08/27 13:15:25 ache Exp $
|
||||
*/
|
||||
static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";
|
||||
|
||||
@ -62,6 +62,8 @@ static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";
|
||||
#include <i386/isa/isa_device.h>
|
||||
#include <i386/isa/mcdreg.h>
|
||||
|
||||
#define MIN_DELAY 10
|
||||
|
||||
/* user definable options */
|
||||
/*#define MCD_TO_WARNING_ON*/ /* define to get timeout messages */
|
||||
/*#define MCDMINI*/ /* define for a mini configuration for boot kernel */
|
||||
@ -637,10 +639,10 @@ mcd_waitrdy(int port,int dly)
|
||||
int i;
|
||||
|
||||
/* wait until xfer port senses data ready */
|
||||
for (i=0; i<dly; i++) {
|
||||
for (i=0; i<dly; i+=MIN_DELAY) {
|
||||
if ((inb(port+mcd_xfer) & MCD_ST_BUSY)==0)
|
||||
return 0;
|
||||
DELAY(10);
|
||||
DELAY(MIN_DELAY);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user