Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-2-0]: src/sys/dev/ic Pullup rev 1.19-1.20 (requested by bouyer in...
details: https://anonhg.NetBSD.org/src/rev/ba3fae467cee
branches: netbsd-2-0
changeset: 564924:ba3fae467cee
user: jmc <jmc%NetBSD.org@localhost>
date: Fri Dec 16 20:05:42 2005 +0000
description:
Pullup rev 1.19-1.20 (requested by bouyer in ticket #10177)
Don't call alloc_scb() (which can call bus_dmamem_alloc/map) from
ADAPTER_REQ_RUN_XFER context (which can be interrupt context), defer this
to the ADAPTER_REQ_GROW_RESOURCES callback. Fixes a panic in uvm.
diffstat:
sys/dev/ic/aic7xxx_osm.c | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diffs (51 lines):
diff -r b79acc205177 -r ba3fae467cee sys/dev/ic/aic7xxx_osm.c
--- a/sys/dev/ic/aic7xxx_osm.c Fri Dec 16 20:05:39 2005 +0000
+++ b/sys/dev/ic/aic7xxx_osm.c Fri Dec 16 20:05:42 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: aic7xxx_osm.c,v 1.14 2003/11/02 11:07:44 wiz Exp $ */
+/* $NetBSD: aic7xxx_osm.c,v 1.14.2.1 2005/12/16 20:05:42 jmc Exp $ */
/*
* Bus independent FreeBSD shim for the aic7xxx based adaptec SCSI controllers
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aic7xxx_osm.c,v 1.14 2003/11/02 11:07:44 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aic7xxx_osm.c,v 1.14.2.1 2005/12/16 20:05:42 jmc Exp $");
#include <dev/ic/aic7xxx_osm.h>
#include <dev/ic/aic7xxx_inline.h>
@@ -78,8 +78,8 @@
ahc->sc_adapter.adapt_dev = &ahc->sc_dev;
ahc->sc_adapter.adapt_nchannels = (ahc->features & AHC_TWIN) ? 2 : 1;
-
- ahc->sc_adapter.adapt_openings = AHC_MAX_QUEUE;
+
+ ahc->sc_adapter.adapt_openings = ahc->scb_data->numscbs - 1;
ahc->sc_adapter.adapt_max_periph = 16;
ahc->sc_adapter.adapt_ioctl = ahc_ioctl;
@@ -92,6 +92,7 @@
ahc->sc_channel.chan_ntargets = (ahc->features & AHC_WIDE) ? 16 : 8;
ahc->sc_channel.chan_nluns = 8 /*AHC_NUM_LUNS*/;
ahc->sc_channel.chan_id = ahc->our_id;
+ ahc->sc_channel.chan_flags |= SCSIPI_CHAN_CANGROW;
if (ahc->features & AHC_TWIN) {
ahc->sc_channel_b = ahc->sc_channel;
@@ -330,7 +331,12 @@
break;
}
case ADAPTER_REQ_GROW_RESOURCES:
- printf("%s: ADAPTER_REQ_GROW_RESOURCES\n", ahc_name(ahc));
+#ifdef AHC_DEBUG
+ printf("%s: ADAPTER_REQ_GROW_RESOURCES\n", ahc_name(ahc));
+#endif
+ chan->chan_adapter->adapt_openings += ahc_alloc_scbs(ahc);
+ if (ahc->scb_data->numscbs >= AHC_SCB_MAX_ALLOC)
+ chan->chan_flags &= ~SCSIPI_CHAN_CANGROW;
return;
case ADAPTER_REQ_SET_XFER_MODE:
Home |
Main Index |
Thread Index |
Old Index