summaryrefslogtreecommitdiff
path: root/sys/dev/pci/pciide.c
diff options
context:
space:
mode:
authorAlexander Yurchenko <grange@cvs.openbsd.org>2003-02-24 01:34:42 +0000
committerAlexander Yurchenko <grange@cvs.openbsd.org>2003-02-24 01:34:42 +0000
commit0c824e52c6cfa1c2fc2ad3cc75f05469501da32b (patch)
treeac0e5b9bce838f31f5dba31a05c601e62d2db6fb /sys/dev/pci/pciide.c
parent2df9df11dff5f901daa3590deacde713aac4bf27 (diff)
For CMD chips call pciide_chan_candisable() for both channels to prevent
setuping channel 0 without any drives. This solves a long delay during the pciide probe on a diskless sparc64. Found and tested by miod@.
Diffstat (limited to 'sys/dev/pci/pciide.c')
-rw-r--r--sys/dev/pci/pciide.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pci/pciide.c b/sys/dev/pci/pciide.c
index 902aaad94dc..a593f57cc34 100644
--- a/sys/dev/pci/pciide.c
+++ b/sys/dev/pci/pciide.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pciide.c,v 1.114 2003/02/21 20:10:33 grange Exp $ */
+/* $OpenBSD: pciide.c,v 1.115 2003/02/24 01:34:41 grange Exp $ */
/* $NetBSD: pciide.c,v 1.127 2001/08/03 01:31:08 tsutsui Exp $ */
/*
@@ -2549,8 +2549,8 @@ cmd_channel_map(pa, sc, channel)
pciide_unmap_compat_intr(pa, cp, channel, interface);
return;
}
- if (channel == 1) {
- if (pciide_chan_candisable(cp)) {
+ if (pciide_chan_candisable(cp)) {
+ if (channel == 1) {
ctrl &= ~CMD_CTRL_2PORT;
pciide_pci_write(pa->pa_pc, pa->pa_tag,
CMD_CTRL, ctrl);