summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorthorpej <thorpej@NetBSD.org>2004-01-07 22:06:57 +0000
committerthorpej <thorpej@NetBSD.org>2004-01-07 22:06:57 +0000
commit778161fb7fe271aaae92a4c8fd537d0b1ed4b9c7 (patch)
tree5f6d37de37e3062b8d5e19552c995e5adce45c41 /sys/dev
parentcb9ba8776e9586e982af7f8e3cc0b7b5e8bcd8d7 (diff)
Initialize some importantant members of the drive info structure. (I have
no idea how this worked for me before, but I swear that it did...) kern/24015.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/satalink.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/pci/satalink.c b/sys/dev/pci/satalink.c
index 8eccf553266..04fd42e9645 100644
--- a/sys/dev/pci/satalink.c
+++ b/sys/dev/pci/satalink.c
@@ -1,4 +1,4 @@
-/* $NetBSD: satalink.c,v 1.11 2004/01/03 22:56:53 thorpej Exp $ */
+/* $NetBSD: satalink.c,v 1.12 2004/01/07 22:06:57 thorpej Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -742,6 +742,13 @@ sii3112_drv_probe(struct wdc_channel *chp)
struct pciide_softc *sc = (struct pciide_softc *)cp->wdc_channel.ch_wdc;
uint32_t scontrol, sstatus;
uint8_t scnt, sn, cl, ch;
+ int i;
+
+ /* XXX This should be done by other code. */
+ for (i = 0; i < 2; i++) {
+ chp->ch_drive[i].chnl_softc = chp;
+ chp->ch_drive[i].drive = i;
+ }
/*
* The 3112 is a 2-port part, and only has one drive per channel