diff options
author | Alexander Yurchenko <grange@cvs.openbsd.org> | 2003-10-17 08:51:20 +0000 |
---|---|---|
committer | Alexander Yurchenko <grange@cvs.openbsd.org> | 2003-10-17 08:51:20 +0000 |
commit | d1a4b7746fd899ff160d64dcdcf6a64331273210 (patch) | |
tree | c31935e105b6e493fed7874556b1264a7194dac9 | |
parent | 6dbc421deb21d25ce2935f847921dc56a8399cbb (diff) |
Old CMD chips don't have independant channels; from NetBSD.
Work by niklas@ but he don't want to commit it and it causes conflicts.
-rw-r--r-- | sys/dev/pci/pciide.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/sys/dev/pci/pciide.c b/sys/dev/pci/pciide.c index 8f1d947c22e..d7dcecf9a13 100644 --- a/sys/dev/pci/pciide.c +++ b/sys/dev/pci/pciide.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pciide.c,v 1.144 2003/10/17 08:14:09 grange Exp $ */ +/* $OpenBSD: pciide.c,v 1.145 2003/10/17 08:51:19 grange 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 { |