Module Name: src Committed By: andvar Date: Tue Mar 11 16:35:03 UTC 2025
Modified Files: src/sys/dev/pci: viaide.c Log Message: viaide(4): check and add ATA RAID capability in via_sata_chip_map_new() used by VT6241(A) RAID controller. This is required for ataraid(4) to attach on this controller if RAID was configured using its firwmare. The conditions may be redundant for this controller, but it is uncertain what variations exist in the wild. Worth pulling up to netbsd-9, 10. To generate a diff of this commit: cvs rdiff -u -r1.92 -r1.93 src/sys/dev/pci/viaide.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/viaide.c diff -u src/sys/dev/pci/viaide.c:1.92 src/sys/dev/pci/viaide.c:1.93 --- src/sys/dev/pci/viaide.c:1.92 Mon Mar 3 22:22:37 2025 +++ src/sys/dev/pci/viaide.c Tue Mar 11 16:35:03 2025 @@ -1,4 +1,4 @@ -/* $NetBSD: viaide.c,v 1.92 2025/03/03 22:22:37 andvar Exp $ */ +/* $NetBSD: viaide.c,v 1.93 2025/03/11 16:35:03 andvar Exp $ */ /* * Copyright (c) 1999, 2000, 2001 Manuel Bouyer. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: viaide.c,v 1.92 2025/03/03 22:22:37 andvar Exp $"); +__KERNEL_RCSID(0, "$NetBSD: viaide.c,v 1.93 2025/03/11 16:35:03 andvar Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -1147,6 +1147,10 @@ via_sata_chip_map_new(struct pciide_soft sc->sc_wdcdev.sc_atac.atac_nchannels = 3; sc->sc_wdcdev.wdc_maxdrives = 2; + 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); if (pci_intr_map(pa, &intrhandle) != 0) {