NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

PR/37517 CVS commit: [netbsd-10] src



The following reply was made to PR kern/37517; it has been noted by GNATS.

From: "Martin Husemann" <martin%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc: 
Subject: PR/37517 CVS commit: [netbsd-10] src
Date: Fri, 9 May 2025 11:11:59 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Fri May  9 11:11:59 UTC 2025
 
 Modified Files:
 	src/share/man/man4 [netbsd-10]: viaide.4
 	src/sys/dev/pci [netbsd-10]: ahcisata_pci.c pciide_apollo_reg.h
 	    viaide.c
 
 Log Message:
 Pull up following revision(s) (requested by andvar in ticket #1101):
 
 	sys/dev/pci/viaide.c: revision 1.90
 	sys/dev/pci/ahcisata_pci.c: revision 1.72
 	sys/dev/pci/pciide_apollo_reg.h: revision 1.21
 	sys/dev/pci/viaide.c: revision 1.91
 	sys/dev/pci/viaide.c: revision 1.92
 	sys/dev/pci/viaide.c: revision 1.93
 	sys/dev/pci/viaide.c: revision 1.94
 	sys/dev/pci/viaide.c: revision 1.96
 	sys/dev/pci/viaide.c: revision 1.97
 	sys/dev/pci/viaide.c: revision 1.98
 	share/man/man4/viaide.4: revision 1.11
 	share/man/man4/viaide.4: revision 1.12
 
 Use the chipset name to describe the IDE controller in order to avoid confusion.
 VT800->VX800 and VT855->VX855.
 Add VIA VT8261 southbridge SATA controller IDs and PCIB.
 viaide(4): use via_chip_map() instead of via_sata_chip_map_new() to attach
 CX700/VX800 IDE/SATA RAID controllers and set interface flags the same way as
 the VT6410_RAID case for native interrupts required by RAID mode.
 Device descriptions were moved to pciide_via_products and updated to cascade
 VT6410_RAID and CX700_IDE options.
 via_sata_chip_map_new previously worked more by "accident," as it did not
 return early on failure to map SATA registers and defaulted to the generic
 drive probe function. However, it failed to attach PATA drives (endless
 timeouts) and incorrectly detected "three" channels as VT6421, despite the
 controller having only two.
 Fixes PR kern/59010.
 Reviewed and approved by jakllsch@.
 
 Update CX700_IDE and CX700M2_IDE descriptions to better reflect their actual
 purpose.
 These are not separate IDE controllers for CX700 and CX700M2 but rather the
 IDE and RAID modes of the same controller in these chipsets (and few more).
 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.
 
 viaide(4): add IDE controller identification by the VT8237S ISA bridge.
 The controller's PATA interface uses PCI ID 0x0571, which is shared among
 many VIA southbridges. The ISA bridge is used to identify capabilities,
 including for the VT8237S.
 Unknown PATA controllers disable UDMA by default. This change ensures PATA
 drives attach at full speed.
 
 viaide(4): Add support for VIA VT8261 IDE/SATA integrated controller.
 
 The VT8261 southbridge, paired with the VN1000 chipset, is obscure and hard to
 find. Besides some evaluation boards surfacing after Centaurs demise, at least
 one rare production motherboard is known to exist.
 
 Despite its rarity, the VT8261 is very similar to the VT8251. It uses separate
 PCI IDs for PATA and SATA (IDE/RAID modes) with 4 SATA ports in total, 2 ports
 sharing one channel, and maps registers through BAR5. This similarity made
 adding basic support relatively simple (sharing same issues too).
 
 Tested briefly on VIA VT8591B eval board.
 
 viaide(4): Add RAID mode support for VIA VX900/VX11 SATA controllers.
 The BIOS option to enable RAID is uncommon on systems using these chipsets;
 however, at least two motherboards mention it in their manuals. The RAID
 firmware does not provide management features, but it can recognize and boot
 from preconfigured VIA RAID arrays.
 Tested on ECS VX900-I.
 Also add the VX11 chipset to the controller name, as it shares the same PCI ID.
 viaide(4): Improve VT8251 integrated SATA controller support in IDE/RAID modes.
 Use via_chip_map() to attach this controller in IDE and RAID modes, similarly
 to VX800. This allows drives to be identified and attached successfully on all
 four ports (two channels with master/slave ports).
 Switch channel setup to sata_setup_channel(), replacing via_setup_channel().
 This avoids writes to the 0x50 register, which is only relevant for IDE
 controllers. Writes to SATA controller registers caused drives on the IDE
 controller (0x0571) to fail to attach. Apply this fix also to VX900 and VT8261.
 Rename VT8237R_SATA to VT8251_SATA (0x3349 is not used for VT8237R, AFAIK).
 This PCI ID is used in RAID mode on newer (CE) chipset revision and in all
 modes (IDE/RAID/AHCI) on older revision.
 Add the 0x5287 PCI ID, used in IDE mode on newer (CE) chipset revision.
 Rename VT8251_SATA to VT8251_AHCI (0x6287 is used only in AHCI mode).
 Add VT8251_AHCI to the ahcisata(4) quirk list, same as VT8251_SATA.
 For more details, see the tech-kern thread:
 https://mail-index.netbsd.org/tech-kern/2025/04/13/msg030365.html
 Should fix and close PR kern/37517.
 Tested on Asus A8V-VM (CD) and MSI MS-7318 (CE) motherboards.
 Reviewed by bad.
 viaide(4): check if chip enable register returns 0 before emulating enable
 bits.
 At least some VT6410 controllers have register exposed. In fact, some
 motherboards allow to control IDE channels (enable/disable them).
 viaide(4): update the list of supported VIA controllers.
 viaide(4): remove notes section about VT6421, it is not currently required to
 setup RAID/JBOD sets to access drives.
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.10 -r1.10.58.1 src/share/man/man4/viaide.4
 cvs rdiff -u -r1.68.2.3 -r1.68.2.4 src/sys/dev/pci/ahcisata_pci.c
 cvs rdiff -u -r1.20 -r1.20.86.1 src/sys/dev/pci/pciide_apollo_reg.h
 cvs rdiff -u -r1.89 -r1.89.28.1 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.
 


Home | Main Index | Thread Index | Old Index