Re: I did a test on a DEC AlphaStation 600 and the SCSI driver seems borked
Magnus Lindholm <[email protected]> Tue, 17 Feb 2026 09:58:07 +0100
| Newsgroups | gmane.os.netbsd.ports.alpha |
|---|---|
| Message-ID | <CA+=Fv5Q+Kiot2Q8gCRLmVPY_kYhbYDnBTA8n8J3qptukR1Z8qQ@mail.gmail.com> |
> > What=E2=80=99s happening is that the PCI front-end (sys/dev/pci/isp_pci.c= ) is converting the normal RQSTYPE_REQUEST request into RQSTYPE_A64 (=E2=80= =9Crequest, but using 64-bit DMA addressing=E2=80=9D). It does this condit= ional on "sizeof (bus_addr_t) > 4=E2=80=9D, which at first glance is correc= t, but it=E2=80=99s actually not. The NetBSD PCI infrastructure has two se= parate DMA =E2=80=9Ctags=E2=80=9D (mapping back-ends), the standard DMA tag= , and the 64-bit DMA tag. A device using the standard DMA tag does not nee= d to use 64-bit DMA, and so this test that the PCI front-end is doing is in= correct; it doesn=E2=80=99t need to use 64-bit DMA at all. > > (In fact, on most NetBSD/alpha systems, 64-bit PCI DMA is not necessary b= ecause the max RAM in the system is within the DMA window that fits into 32= address bits; the only one that supports a large 64-bit DMA window are the= Titan-class systems, such as the DS25.). But even those systems have an IO= MMU that supports 32-bit PCI devices. > > In any case, this PCI front-end behavior would be fine except for the log= ic in sys/dev/ic/isp.c:isp_intr() does not properly handle the 64-bit flavo= r of the request. It has a normal-completion handler for it that implies i= t should be handled exactly like the garden-variety RQSTYPE_REQUEST: > I've been struggling with the ISP driver on Linux for a while, (qla1280 as linux call it). The Linux driver can be built as a "64-bit driver" by setting QLA_64BIT_PTR which is by default if we have CONFIG_ARCH_DMA_ADDR_T_64BIT. This is actually required for the driver to work on some SGI/mips systems. My issues with the driver turned out to be DAC support on Alpha. The driver ran fine in 64-bit mode with a 64-bit DMA_MASK enbeling the "monster window" on Alpha. This worked fine on Rawhide based Alphas such as the Alphaserver 4100, but does not work on tsunami based Alphas, such as ES40. At least when there is more than 2GB RAM available, if enabled, the "monster window" is activated on Alpha systems with more than 2GB RAM if the DMA_MASK is > 40 bits. Anyways I ended up with the conclusion that the Linux driver was fine, but there was issues with PCI/DAC/DMA on certain Alphas 32-bit mode on the ISP driver worked on all combinations of ISP cards (tested ISP1080, ISP1040revB and ISP1040revC, ISP1020). When the driver was in 64-bit mode with full 64-bit DMA mask, certain combination of cards and Alpha chipsets and installed RAM did not work, most notably any ISP card with a 32-bit PCI interface did not work on tsunami based Alphas that had more than 2GB ram installed. At the time I was working on this issue for Linux I looked at how NetBSD did things for the card since my qlogic ISP1040 card worked fine on NetBSD, but maybe NetBSD never activated the monster window for DMA transfers? Anyway, this was maybe a bit off topic but I wanted to share some of my experiences with qlogic ISP cards on Alpha, even though it's mostly on Linux. Magnus