Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Now wdcattach() is called interrupts enabled, con...
details: https://anonhg.NetBSD.org/src/rev/8934fd3b15c7
branches: trunk
changeset: 552147:8934fd3b15c7
user: enami <enami%NetBSD.org@localhost>
date: Sat Sep 20 02:19:36 2003 +0000
description:
Now wdcattach() is called interrupts enabled, config_interrupts() tries to
call ata_raid_check_component() immediately, and panics since DMA setup
isn't done yet. So, defer the call until attach stage is almost done.
Tested with Promise TX2000.
diffstat:
sys/dev/ic/wdc.c | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
diffs (48 lines):
diff -r 6657d61769bc -r 8934fd3b15c7 sys/dev/ic/wdc.c
--- a/sys/dev/ic/wdc.c Sat Sep 20 01:03:30 2003 +0000
+++ b/sys/dev/ic/wdc.c Sat Sep 20 02:19:36 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wdc.c,v 1.125 2003/09/19 21:36:02 mycroft Exp $ */
+/* $NetBSD: wdc.c,v 1.126 2003/09/20 02:19:36 enami Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved.
@@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.125 2003/09/19 21:36:02 mycroft Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.126 2003/09/20 02:19:36 enami Exp $");
#ifndef WDCDEBUG
#define WDCDEBUG
@@ -542,14 +542,8 @@
adev.adev_drv_data = &chp->ch_drive[i];
chp->ata_drives[i] = config_found(&chp->wdc->sc_dev,
&adev, wdprint);
- if (chp->ata_drives[i] != NULL) {
+ if (chp->ata_drives[i] != NULL)
wdc_probe_caps(&chp->ch_drive[i]);
-#if NATARAID > 0
- if (chp->wdc->cap & WDC_CAPABILITY_RAID)
- config_interrupts(chp->ata_drives[i],
- ata_raid_check_component);
-#endif /* NATARAID > 0 */
- }
}
/*
@@ -592,6 +586,13 @@
chp->wdc->set_modes(chp);
wdc_print_modes(chp);
+#if NATARAID > 0
+ if (chp->wdc->cap & WDC_CAPABILITY_RAID)
+ for (i = 0; i < 2; i++)
+ if (chp->ata_drives[i] != NULL)
+ ata_raid_check_component(chp->ata_drives[i]);
+#endif /* NATARAID > 0 */
+
out:
wdc_delref(chp);
}
Home |
Main Index |
Thread Index |
Old Index