diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2009-01-17 20:36:43 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2009-01-17 20:36:43 +0000 |
commit | e53a83f95418337d04f6cc3057f52e2053e34bab (patch) | |
tree | 17831242c572722bd314c7a341aed4122582df8c /sys | |
parent | d185b1a4f081405ed3f21065bbdaf7b3f355362c (diff) |
Return NO_CCB if we run out of descriptors.
Suggested by krw@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/sparc64/dev/vdsk.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/arch/sparc64/dev/vdsk.c b/sys/arch/sparc64/dev/vdsk.c index 26af51b70df..3fbd6f8fc10 100644 --- a/sys/arch/sparc64/dev/vdsk.c +++ b/sys/arch/sparc64/dev/vdsk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vdsk.c,v 1.6 2009/01/17 17:11:10 kettenis Exp $ */ +/* $OpenBSD: vdsk.c,v 1.7 2009/01/17 20:36:42 kettenis Exp $ */ /* * Copyright (c) 2009 Mark Kettenis * @@ -922,7 +922,8 @@ vdsk_scsi_cmd(struct scsi_xfer *xs) int desc, s; int timeout; - KASSERT(sc->sc_tx_cnt < sc->sc_vd->vd_nentries); + if (sc->sc_tx_cnt >= sc->sc_vd->vd_nentries) + return (NO_CCB); desc = sc->sc_tx_prod; |