Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci If a dma map can't be loaded due to resource sho...



details:   https://anonhg.NetBSD.org/src/rev/76c3f6f8d08f
branches:  trunk
changeset: 526839:76c3f6f8d08f
user:      matt <matt%NetBSD.org@localhost>
date:      Sun May 12 16:51:06 2002 +0000

description:
If a dma map can't be loaded due to resource shortage, make we report that
as a resource shortage instead of a driver stuffup.

diffstat:

 sys/dev/pci/isp_pci.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 303b142f3259 -r 76c3f6f8d08f sys/dev/pci/isp_pci.c
--- a/sys/dev/pci/isp_pci.c     Sun May 12 16:27:59 2002 +0000
+++ b/sys/dev/pci/isp_pci.c     Sun May 12 16:51:06 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isp_pci.c,v 1.78 2002/04/28 21:32:14 mjacob Exp $ */
+/* $NetBSD: isp_pci.c,v 1.79 2002/05/12 16:51:06 matt Exp $ */
 /*
  * This driver, which is contained in NetBSD in the files:
  *
@@ -57,7 +57,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isp_pci.c,v 1.78 2002/04/28 21:32:14 mjacob Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isp_pci.c,v 1.79 2002/05/12 16:51:06 matt Exp $");
 
 #include <dev/ic/isp_netbsd.h>
 #include <dev/pci/pcireg.h>
@@ -1021,6 +1021,8 @@
            BUS_DMA_NOWAIT : BUS_DMA_WAITOK) | BUS_DMA_STREAMING |
            ((xs->xs_control & XS_CTL_DATA_IN) ? BUS_DMA_READ : BUS_DMA_WRITE));
        if (error) {
+               if (error == EAGAIN || error == ENOMEM)
+                       return (CMD_EAGAIN);
                XS_SETERR(xs, HBA_BOTCH);
                return (CMD_COMPLETE);
        }



Home | Main Index | Thread Index | Old Index