The VT8237A SATA Controller uses chip_map_7, not 0, tested and confirmed
working on my machine. Also when a via controller is set to RAID mode, it sets the pci_subclass to raid. Notice this and set ATAC_CAP_RAID.
This commit is contained in:
parent
df0f62d579
commit
4398c0d8cd
|
@ -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 <sys/cdefs.h>
|
||||
__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 <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue