When cold!=0 force SCSI_POLL (otherwise swapconf will hang)

This commit is contained in:
gwr 1997-03-24 17:16:45 +00:00
parent 0607611785
commit 5c88d15269
1 changed files with 11 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ncr53c9x.c,v 1.3 1997/03/15 18:11:31 is Exp $ */
/* $NetBSD: ncr53c9x.c,v 1.4 1997/03/24 17:16:45 gwr Exp $ */
/*
* Copyright (c) 1996 Charles M. Hannum. All rights reserved.
@ -511,12 +511,21 @@ ncr53c9x_scsi_cmd(xs)
struct ncr53c9x_softc *sc = sc_link->adapter_softc;
struct ncr53c9x_ecb *ecb;
int s, flags;
extern int cold; /* XXX */
NCR_TRACE(("[ncr53c9x_scsi_cmd] "));
NCR_CMDS(("[0x%x, %d]->%d ", (int)xs->cmd->opcode, xs->cmdlen,
sc_link->target));
flags = xs->flags;
/*
* XXX: Hack: During autoconfig, force polling mode.
* Needed as long as sdsize() can be called while cold,
* otherwise timeouts will never call back (grumble).
*/
if (cold)
flags |= SCSI_POLL;
if ((ecb = ncr53c9x_get_ecb(sc, flags)) == NULL) {
xs->error = XS_DRIVER_STUFFUP;
return TRY_AGAIN_LATER;
@ -526,7 +535,7 @@ ncr53c9x_scsi_cmd(xs)
ecb->xs = xs;
ecb->timeout = xs->timeout;
if (xs->flags & SCSI_RESET) {
if (flags & SCSI_RESET) {
ecb->flags |= ECB_RESET;
ecb->clen = 0;
ecb->dleft = 0;