On Sat, Mar 28, 2026 at 12:10:00PM +0200, Andrius V wrote: > On Mon, Nov 3, 2025 at 9:46 AM Andrius V <[email protected]> wrote: > > > > On Mon, Nov 3, 2025 at 11:37 AM Andrius V <[email protected]> wrote: > > > > > > Hi, > > > > > > I was recently working on VIA IDE/SATA controllers in NetBSD and noticed > > > a few > > > missing IDs in the OpenBSD code as a result. > > > > > > The VT8237A and VT8237S chipsets need to be identified not only by their > > > SATA > > > controller IDs, but also by the ISA bus for UDMA support, since their > > > IDE controller > > > uses the common VIA chipset PCI ID 0x0571. > > > > > > The VT8237S also has an additional PCI ID (0x7372) when RAID mode is > > > selected > > > in the BIOS. > > > > > > The VT8251 includes another PCI ID for the CE version of the southbridge > > > (0x5287), which is used when IDE mode is selected. > > > > > > In addition to the above, I included a few more uncommon variants. > > > > > > The VT8233C (ISA bus) supports UDMA100 like the VT8233 (not the VT8233A, > > > which > > > supports UDMA133). This southbridge is quite rare; I have found it only > > > on a > > > few RioWorks motherboard models in the internet resources. > > > > > > The VT8261 is identified by its ISA bus and SATA controller in IDE mode > > > (0x9000). The platform was likely discontinued shortly after release, > > > though at least one regional motherboard used it (and some evaluation > > > boards). > > > > > > I did not include PCI IDs for the VX900 (0x9041) and VT8261 (0x9040) in > > > RAID > > > mode in the patch. > > > > > > I am aware of only two board models with RAID mode option in the BIOS > > > for the VX900, > > > and only one of them has two SATA ports. Therefore, this ID does not seem > > > particularly relevant, though it could be added for completeness if you > > > wish. > > > The VT8261 RAID mode is likely even less relevant due to the rarity of the > > > southbridge and the availability of IDE mode. > > > > > > Additionally, I found that faking VT6410 enable bits is not a good > > > solution for > > > add-in cards. While the controller is identified, the hard drives remain > > > undetected because those channels are actually disabled. A better > > > approach is > > > to enable them directly. The only downside is that some motherboards may > > > provide a BIOS option to control this, and we would override it, though > > > such > > > cases appear to be rare (typically controller is fully disabled, not > > > visible to OS). > > > > > > This does not apply to the VT6415, where faking remains the "best" > > > solution so > > > far. It uses a different and undocumented register structure compared to > > > other > > > VIA controllers. > > > > > > You can refer to the NetBSD viaide(4) driver for details. > > > > > > Regards, > > > Andrius V > > > > Forgot to add: tested patch on VT8251, VT8261 (without PATA drives, no > > connector), > > and VT8237S. > > > > Did not test VT8237A (but it has a datasheet and is similar to > > VT8237(S)) and VT8233C. > > Hi, > > Just a quick reminder that I previously sent a patch to identify > additional VIA IDE/SATA controllers and set up proper UDMA/SATA > capabilities. > > I’ve tested most of them except for the VT8233C and VT8237A (I don’t > have those), but I’m fairly confident that IDE functionality will work > as expected on those as well. > I would appreciate it if you could apply the patch.
The isa bridge to udma mapping part seems fine. The matching of the RAID id I'd leave out, as no other VIA RAID ids are matched. Did you test VT8251/VT8261 on OpenBSD? The Linux code suggests those need different channel handling. > > After the patch, I also tested the external VT6420 IDE controller (ID 0x4149). > The SATA part has the same ID as the VT8237, so it works out of the > box. However, the IDE part didn’t function correctly, so I’m not > suggesting it be added yet. > > If there’s interest, ID 0x9041 could also be added to the SATA list, > similar to PCI_PRODUCT_VIATECH_VX900_IDE. > This is the PCI ID in RAID mode for the VX900/VX11; the option is > rarely available and likely behaves like IDE mode if no RAID is > configured. > > Thanks! > > Regards, > Andrius V > >
