summaryrefslogtreecommitdiff
path: root/sys/dev/pci/pciide.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2003-10-29 18:46:44 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2003-10-29 18:46:44 +0000
commit25ddd5f1a76a8d6bf23e173e2b98b8824f7d345b (patch)
tree2d47320d88b080e32a04a4276c52e133ea90a898 /sys/dev/pci/pciide.c
parent3040d2c78676f453d3db49c86f9df1dcf48ff7a1 (diff)
un-revert previous. wrong suspect. ok deraadt@
Diffstat (limited to 'sys/dev/pci/pciide.c')
-rw-r--r--sys/dev/pci/pciide.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/sys/dev/pci/pciide.c b/sys/dev/pci/pciide.c
index 63ae9d91e3f..0032f94cc19 100644
--- a/sys/dev/pci/pciide.c
+++ b/sys/dev/pci/pciide.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pciide.c,v 1.146 2003/10/29 17:31:11 matthieu Exp $ */
+/* $OpenBSD: pciide.c,v 1.147 2003/10/29 18:46:43 matthieu Exp $ */
/* $NetBSD: pciide.c,v 1.127 2001/08/03 01:31:08 tsutsui Exp $ */
/*
@@ -2715,6 +2715,7 @@ cmd_channel_map(pa, sc, channel)
bus_size_t cmdsize, ctlsize;
u_int8_t ctrl = pciide_pci_read(sc->sc_pc, sc->sc_tag, CMD_CTRL);
pcireg_t interface;
+ int one_channel;
/*
* The 0648/0649 can be told to identify as a RAID controller.
@@ -2736,7 +2737,19 @@ cmd_channel_map(pa, sc, channel)
cp->wdc_channel.channel = channel;
cp->wdc_channel.wdc = &sc->sc_wdcdev;
- if (channel > 0) {
+ /*
+ * Older CMD64X doesn't have independant channels
+ */
+ switch (sc->sc_pp->ide_product) {
+ case PCI_PRODUCT_CMDTECH_649:
+ one_channel = 0;
+ break;
+ default:
+ one_channel = 1;
+ break;
+ }
+
+ if (channel > 0 && one_channel) {
cp->wdc_channel.ch_queue =
sc->pciide_channels[0].wdc_channel.ch_queue;
} else {