diff --git a/sys/dev/pci/viaide.c b/sys/dev/pci/viaide.c index 4cc813819b48..ed4c54336c68 100644 --- a/sys/dev/pci/viaide.c +++ b/sys/dev/pci/viaide.c @@ -1,4 +1,4 @@ -/* $NetBSD: viaide.c,v 1.40 2007/02/10 10:23:18 mlelstv Exp $ */ +/* $NetBSD: viaide.c,v 1.41 2007/03/27 00:04:04 garbled Exp $ */ /* * Copyright (c) 1999, 2000, 2001 Manuel Bouyer. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: viaide.c,v 1.40 2007/02/10 10:23:18 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: viaide.c,v 1.41 2007/03/27 00:04:04 garbled Exp $"); #include #include @@ -276,7 +276,7 @@ static const struct pciide_product_desc pciide_via_products[] = { { PCI_PRODUCT_VIATECH_VT8237A_SATA, 0, "VIA Technologies VT8237A SATA Controller", - via_sata_chip_map_0, + via_sata_chip_map_7, }, { PCI_PRODUCT_VIATECH_VT8237R_SATA, 0, @@ -484,6 +484,10 @@ unknown: sc->sc_wdcdev.sc_atac.atac_channels = sc->wdc_chanarray; sc->sc_wdcdev.sc_atac.atac_nchannels = PCIIDE_NUM_CHANNELS; + if (PCI_CLASS(pa->pa_class) == PCI_CLASS_MASS_STORAGE && + PCI_SUBCLASS(pa->pa_class) == PCI_SUBCLASS_MASS_STORAGE_RAID) + sc->sc_wdcdev.sc_atac.atac_cap |= ATAC_CAP_RAID; + wdc_allocate_regs(&sc->sc_wdcdev); ATADEBUG_PRINT(("via_chip_map: old APO_IDECONF=0x%x, " @@ -683,6 +687,10 @@ via_sata_chip_map_common(struct pciide_softc *sc, struct pci_attach_args *pa) sc->sc_wdcdev.sc_atac.atac_cap |= ATAC_CAP_DATA16 | ATAC_CAP_DATA32; sc->sc_wdcdev.sc_atac.atac_set_modes = sata_setup_channel; + if (PCI_CLASS(pa->pa_class) == PCI_CLASS_MASS_STORAGE && + PCI_SUBCLASS(pa->pa_class) == PCI_SUBCLASS_MASS_STORAGE_RAID) + sc->sc_wdcdev.sc_atac.atac_cap |= ATAC_CAP_RAID; + wdc_allocate_regs(&sc->sc_wdcdev); maptype = pci_mapreg_type(pa->pa_pc, pa->pa_tag, PCI_MAPREG_START + 0x14);